var n=String(window.document.location);
var webpath=n.substring(0,n.lastIndexOf("/"));
alert(webpath) ;
var n=String(window.document.location);
var webpath=n.substring(0,n.lastIndexOf("/"));
alert(webpath) ;
转载于:https://www.cnblogs.com/visoeclipse/archive/2009/12/24/1631212.html