页面间跳转获取穿过来的参数,?后面的

//传递参数

var id = columnData.id;

var companyname = encodeURI(columnData.companyname);

var linename = encodeURI(columnData.linename);

text = text + "修改  ";

/**

* 页面获取参数方法

* @param name

* @returns

*/

var LocString = String(window.document.location.href);

function GetQueryString(name) {

var rs = new RegExp("(^|)" + name + "=([^&]*)(&|$)", "gi").exec(LocString), tmp;

if (tmp = rs) {

return decodeURI(tmp[2]);

}

// parameter cannot be found

return "";

}

//新页面获取列表页面传来的参数

var id = GetQueryString("id");

var companyname = GetQueryString("companyname");

var linename = GetQueryString("linename");

你可能感兴趣的:(页面间跳转获取穿过来的参数,?后面的)