获取url的参数
首先设置公共函数
$.request = function (name) { var search = location.search.slice(1); var arr = search.split("&"); for (var i = 0; i < arr.length; i++) { var ar = arr[i].split("="); if (ar[0] == name) { if (unescape(ar[1]) == 'undefined') { return ""; } else { return unescape(ar[1]); } } } return ""; }
获取参数
var aa = $.request("aa");
本文来自博客园,作者:quitpoison,转载请注明原文链接:https://www.cnblogs.com/quitpoison/p/10980333.html