jQuery.queryString

司马宏茂
2023-12-01
jQuery.queryString = function(query) {
    var search = window.location.search + '';
    if (search.charAt(0) != '?') {
        return undefined;
    }
    else {
        search = search.replace('?', '').split('&');
        for (var i = 0; i < search.length; i++) {
            if (search[i].split('=')[0] == query) {
                return decodeURI(search[i].split('=')[1]);
            }
        }
        return undefined;
    }
};
 类似资料:

相关阅读

相关文章

相关问答