js:function GetRequest() { //获取get请求"?"后的参数
var url = location.search; //获取url中"?"符后的字串
var theRequest = new Object();
if (url.indexOf("?") != -1) {
var str = url.substr(1);
strs = str.split("&");
for(var i = 0; i < strs.length; i ++) {
theRequest[strs[i].split("=")[0]]=unescape(strs[i].split("=")[1]);
}
}
return theRequest;
}
if(!!location.search){ //如果请求url;"?"后有参数,执行if中代码块
var Request = GetRequest();
$("#orderCode").val(Request["orderCode"]);
//跳转页面,查询按钮自己执行点击
$("#subBtn").trigger("click");
}
web前端带参数跳转
最新推荐文章于 2023-02-21 10:46:10 发布