<script>
alert("Protocol type: "+location.protocol)
alert("Website url: "+document.domain);
alert("Port Number: "+location.port);
var u = location.port!="" ? ':'+location.port :"";
var baseurl = location.protocol+"//"+document.domain+u;
alert(baseurl)
</script>
alert("Protocol type: "+location.protocol)
alert("Website url: "+document.domain);
alert("Port Number: "+location.port);
var u = location.port!="" ? ':'+location.port :"";
var baseurl = location.protocol+"//"+document.domain+u;
alert(baseurl)
</script>
Demo
0 comments:
Post a Comment