jquery截取地址栏中url参数的值
<script> /*http://127.0.0.9/index.php?s=/Home/Index/fangguan_shuju&zc=2*/ function getQueryString (name){ var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i"); var r = window.location.search.substr(1).match(reg); if (r != null) return unescape(r[2]); return null; }; var aa= getQueryString("zc");//我只获取zc的get值 console.log(aa); </script>