/**
* Created by Administrator on 2015/10/31.
*
* jsp , url
*
* , jQuery
*
* , ready , basePath
*/
function basePath(){
var curWwwPath = window.document.location.href;
var pathName = window.document.location.pathname;
var pos = curWwwPath.indexOf(pathName);
var localhostPath = curWwwPath.substring(0, pos);
var projectName = pathName.substring(0, pathName.substr(1).indexOf('/') + 1);
var basePath=localhostPath+projectName+"/";
return basePath;
};
var basePath;;
$(document).ready(
function() {
basePath=basePath();
alert(basePath);
});