获取URL某个参数

    /* 获取URL某个参数(可以是中文)
* 返回:字符串
*/
function getUrlParam(key) {
    // 获取参数
    var url = window.location.search;
    // 正则筛选地址栏
    var reg = new RegExp("(^|&)" + key + "=([^&]*)(&|$)");
    // 匹配目标参数
    var result = url.substr(1).match(reg);
    //返回参数值
    return result ? decodeURIComponent(result[2]) : null;
}
var order_no = getUrlParam('order_no');
原文地址:https://www.cnblogs.com/lst619247/p/9878232.html