摘要: /** window.location.search获取url地址?以后的值 获取url参数有两种方法,第一种如下,第二种是通过正则*///基本版function getParam() {var url = window.location.search.slice(1);var arrUrl = url.split("&");var obj = {};for(var k in arrUrl){var re = arrUrl[k].split("=");obj[re[0]] = re[1];}return obj;}//调用:var param = 阅读全文
posted @ 2014-02-08 17:13 mimeay 阅读(298) 评论(0) 推荐(0) 编辑