Edit This Code:
See Result »
<
!DOCTYPE
html
>
<
html
>
<
body
>
<
p
>
Display the protocol portion of the current URL.
<
/p
>
<
p
id
="demo"
>
<
/p
>
<
script
>
document.getElementById(
"demo"
).innerHTML =
"Page protocol is: "
+ window.location.protocol;
<
/script
>
<
/body
>
<
/html
>
<!DOCTYPE html> <html> <body> <p>Display the protocol portion of the current URL.</p> <p id="demo"></p> <script> document.getElementById("demo").innerHTML = "Page protocol is: " + window.location.protocol; </script> </body> </html>
Result:
Privacy Policy