function Request(key) {
        var url = window.location.href;
        var pos = url.indexOf("?");
        var allValues = url.substr(pos + 1);
        var tmpValues = allValues.split("&");
        for (var i = 0; i < tmpValues.length; i++) {
            var tmpValue = tmpValues[i].split("=");
            if (tmpValue != null && tmpValue.length > 0) {
                if (tmpValue[0].toLowerCase() == key.toLowerCase()) {
                    try {
                        return tmpValue[1];
                    } catch (e) {
                        return "";
                    }
                }
            }
        }
        return "";
    }

 

posted on 2013-02-01 18:56  gzh4455  阅读(790)  评论(0编辑  收藏  举报