日期:2014-05-17 浏览次数:20759 次
function getRootPath(){
var strFullPath=window.document.location.href;
var strPath=window.document.location.pathname;
var pos=strFullPath.indexOf(strPath);
var prePath=strFullPath.substring(0,pos);
var postPath=strPath.substring(0,strPath.substr(1).indexOf('/')+1);
return(prePath+postPath);
}
------解决方案--------------------
你在客户端跟 根目录较的什么劲,用JS获取URL判断。否则就用AJAX。否则就是<%=ResolveUrl("~/ckeditor/ckeditor.js") %> 这个和写在CS里是一样的