GetParam(name)

 function GetParam(name) {
            var match = new RegExp(name +  
                "=*([^&]+)*", "i").exec(location.search);   
            if (match == null)             
                match = new RegExp(name + "=(.+)", "i").exec(location.search);  
            if (match == null) return null;             
                match = match + "";           
            //**convert match to a string       
            result = match.split(",");          
            return decodeURIComponent(result[1]);     
        } 

 

你可能感兴趣的:(param)