获取url参数的值function getQuery(name) {var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");var r = window.location.search.substr(1).match(reg);if (r != null) return decodeURI(r[2], "UTF-8");return null;}```调用方法:getQuery("参数名")实例:https://www.