...
...
...
转 : https://www.cnblogs.com/ysx215/p/12024621.html ...
1,设置或获取对象指定的文件名或路径。 alert(window.location.pathname) 2,设置或获取整个 URL 为字符串。 alert(window.location.href); 3,设置或获取与 URL 关联的端口号 ...
思路,通过ajax重新请求当前页面,用getAllResponseHeaders方法获取: var req = new XMLHttpRequest();req.open('GET', document.location, false);req.send(null);console.log ...
引入jquery.js $.getScript('http://int.dpool.sina.com.cn/iplookup/iplookup.php?format=js',function(){ alert(remote_ip_info.country ...
引入jquery.js $.getScript('http://int.dpool.sina.com.cn/iplookup/iplookup.php?format=js',function(){ alert(remote_ip_info.country ...