function GetQueryString(name) {var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");var r = window.location.search.substr(1).match(reg);if (r != null) return unescape(r[2]); return null;}我的表达式没错啊他老是提示错误我的调用是这样的 RequesByPostMethod("/Home/GetClothingDetail", GetQueryString("id"), function (data) {....这是IE浏览器里的错误jQuery.Deferred exception: 正则表达式语法错误 SyntaxError: 正则表达式语法错误 at GetQueryString (http://localhost:54417/Content/js/ajaxfunc.js:21:5at Search (http://localhost:54417/Home/details:494:9)at Anonymous function (http://localhost:54417/Home/details:523:9)at l (http://localhost:54417/Content/js/jquery-3.3.1.min.js:2:29367) at Anonymous function (http://localhost:54417/Content/js/jquery-3.3.1.min.js:2:29677) undefined
添加回答
举报
0/150
提交
取消