<html> <head> <script> function displayFunction() { document.getElementById("para").innerHTML = "The protocol of the webpage is: "+ window.location.protocol; } </script> </head> <body> <p>Click to get The protocol of the Web Page</p> <input type="button" value="Get the protocol" onclick="displayFunction();"/> <p id="para"></p> </body> </html>