js获取当前页面url网址信息
var url;
url = window.location.href;
alert(url);
url = window.location.pathname;
alert(url);
url = window.location.protocol;
alert(url);
url = window.location.host;
alert(url);
url = window.location.hostname;
alert(url);
url = window.location.port;
alert(url);
url = window.location.hash;
alert(url);
url = window.location.search;
alert(url);
url = window.location.pathname;
url = url.substring(url.lastIndexOf('/') + 1, url.length);
alert(url);
var url = window.parent.frames['frame'].location.href;
var url = window.parent.location.href;
var url = parent.window.location.href;