标签:
传值
var brandName = "brandName=" + escape($("#Brand").val());
var carModelName = "carModel=" + escape($("#carModel").val());
window.location.href = "QuerySupplier/Query?" + brandName + "&" + carModelName;
接收值
//接收通过地址栏的通过来的值
function getQueryString(name) {
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
var r = window.location.search.substr(1).match(reg);
if (r != null) return unescape(r[2]);
return null;
}
//品牌
var brandName=getQueryString("brandName");
//车系
var carModel = getQueryString("carModel");
标签:
原文地址:http://www.cnblogs.com/wangtiantian/p/4986803.html