js 获取当前web应用的上下文路径实现方法
时间:2021-07-21 08:22:25|栏目:JavaScript代码|点击: 次
js 获取当前web应用的上下文路径实现方法
//js webcontext
var webroot=document.location.href;
webroot=webroot.substring(webroot.indexOf('//')+2,webroot.length);
webroot=webroot.substring(webroot.indexOf('/')+1,webroot.length);
webroot=webroot.substring(0,webroot.indexOf('/'));
rootpath="/"+webroot;
栏 目:JavaScript代码
本文地址:http://www.codeinn.net/misctech/159882.html






