How to get the web protocol of the current web page in JavaScript

1 Answer

0 votes
document.write("The web protocol of the current web page is: " + window.location.protocol);    
            
/*
run:
  
The web protocol of the current web page is: http: 
  
*/

 



answered Jul 14, 2015 by avibootz
...