码迷,mamicode.com
首页 > 其他好文 > 详细

GetParam(name)

时间:2014-07-08 11:27:15      阅读:181      评论:0      收藏:0      [点我收藏+]

标签:blog   java   cti   javascript   io   div   

 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]);     
        } 

 

GetParam(name),布布扣,bubuko.com

GetParam(name)

标签:blog   java   cti   javascript   io   div   

原文地址:http://www.cnblogs.com/sntetwt/p/3830823.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!