zoukankan      html  css  js  c++  java
  • 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"));
  • 相关阅读:
    [Hibernate]
    [Hibernate]
    [Hibernate]
    [Hibernate]
    [Hibernate]
    [Hibernate]
    [Hibernate]
    [Hibernate]
    [Hibernate]
    [Hibernate]
  • 原文地址:https://www.cnblogs.com/shiningrise/p/5967163.html
Copyright © 2011-2022 走看看