首页 > 代码库 > html传参数

html传参数

        var request = {            QueryString: function (paramName)            {                var url = window.location.search;                paramValue = "";                isFound = false;                if (url.indexOf("?") == 0 && url.indexOf("=") > 1) {                    arrSource = unescape(url).substring(1, url.length).split("&");                    i = 0;                    while (i < arrSource.length && !isFound) {                        if (arrSource[i].indexOf("=") > 0) {                            if (arrSource[i].split("=")[0].toLowerCase() == paramName.toLowerCase()) {                                paramValue = arrSource[i].split("=")[1];                                isFound = true;                            }                        }                        i++;                    }                }                return paramValue;            }        };

//console.log(request.QueryString("Id"));

 

html传参数