//JS获取上下文路径 /* var rootpath; 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; if(rootpath=='/'){ rootpath=''; } */ var rootpath=''; //alert(rootpath); //解决jQuery与其它类库的冲突问题 $j=jQuery.noConflict();