$(document).ready(function() {
//jQuery$(location).attr('href');
//Pure JavaScriptvar pathname = window.location.pathname;
// To show it in an alert windowalert(window.location);});
$.getJSON("idcheck.php?callback=?", { url:$(location).attr('href')}, function(json){//alert(json.message);});
window.location.host #returns hostwindow.location.hostname #returns hostnamewindow.location.path #return pathwindow.location.href #returns full current urlwindow.location.port #returns the portwindow.location.protocol #returns the protocol
console.log(window.location.host); //returns hostconsole.log(window.location.hostname); //returns hostnameconsole.log(window.location.pathname); //return pathconsole.log(window.location.href); //returns full current urlconsole.log(window.location.port); //returns the portconsole.log(window.location.protocol) //returns the protocol