📜  $_GET 数据使用 javascript 代码示例

📅  最后修改于: 2022-03-11 15:01:36.300000             🧑  作者: Mango

代码示例1
function $_GET(q,s) {
    s = (s) ? s : window.location.search;
    var re = new RegExp('&'+q+'=([^&]*)','i');
    return (s=s.replace(/^\?/,'&').match(re)) ?s=s[1] :s='';
}

console.log($_GET("myvariable"));