javascript 获取应用程序根路径

 

var n=String(window.document.location);

var webpath=n.substring(0,n.lastIndexOf("/"));

 

alert(webpath) ;

posted on 2009-12-24 10:51  visoeclipse->jor  阅读(529)  评论(0编辑  收藏  举报