global.js 278 Bytes Raw Blame History Permalink 1 2 3 4 5 6 7 8 9 10 11 /** * html中传递参数,获取方法 * @param key * @returns */ function getQueryStr(key){ var svalue = window.location.search.match(new RegExp("[\?\&]" + key + "=([^\&]*)(\&?)","i")); var str = svalue ? svalue[1] : svalue; return str == null ? "" : str; }