1.当前地址:http:xxxx.com?type=1&area=2;
2.获取当前地址代码
var Url_url = { GetRequest : function(strName) { var strHref = window.location.href; var intPos = strHref.indexOf("?"); var strRight = strHref.substr(intPos + 1); var arrTmp = strRight.split("&"); for (var i = 0; i < arrTmp.length; i++) { var arrTemp = arrTmp[i].split("="); if (arrTemp[0].toUpperCase() == strName.toUpperCase()) { return arrTemp[1]; } } return ""; }}; 3.获取地址参数:var type_url= Url_url.GetRequest("type"), area_url=Url_url.GetRequest("area"),
时间: 2024-10-10 22:58:57