/********Start***********//*获取地址栏参数*/function getRequest(){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;}var Request = new Object();Request = getRequest();var typeid;typeid = Request['id'];/***********END***********//********地址栏有中文也可以***********/function getUrlParam(key) {// 获取参数var url = window.location.search;// 正则筛选地址栏var reg = new RegExp("(^|&)" + key + "=([^&]*)(&|$)");// 匹配目标参数var result = url.substr(1).match(reg);//返回参数值return result ? decodeURIComponent(result[2]) : null;}/********地址栏有中文也可以***********/
100字范文,内容丰富有趣,生活中的好帮手!