发出请求
function loadInfoDetails(a, b, c, d, e, f, g) {
window.location.href = window.basePath + "ssss/xxxxx/jsp/yyyyy.jsp?a=" + a+ "&b=" + b+ "&c=" + c+ "&d=" + d+ "&e=" + e+ "&f=" + f
+ "&g=" + g;
}
获取并解析
$(document).ready(function() {
var url = location.href;
var id;// 提取URL中的 id
var divName;
var typeName;
var typeDetailName;
var ftlURL;
var ftlDetailURL;
var arrStr = url.substring(url.indexOf("?") + 1).split("&");
for (var i = 0; i < arrStr.length; i++) {
var loc = arrStr[i].indexOf("id=");
if (loc != -1) {
id = arrStr[i].replace("id=", "").replace("?", "");
}
loc = arrStr[i].indexOf("divName=")
if (loc != -1) {
divName = arrStr[i].replace("divName=", "");
}
loc = arrStr[i].indexOf("typeName=")
if (loc != -1) {
typeName = arrStr[i].replace("typeName=", "");
}
loc = arrStr[i].indexOf("typeDetailName=")
if (loc != -1) {
typeDetailName = arrStr[i].replace("typeDetailName=", "");
}
loc = arrStr[i].indexOf("ftlURL=")
if (loc != -1) {
ftlURL = arrStr[i].replace("ftlURL=", "");
}
loc = arrStr[i].indexOf("ftlDetailURL=")
if (loc != -1) {
ftlDetailURL = arrStr[i].replace("ftlDetailURL=", "");
}
}
}