sunlanda
7/28/2016 - 8:32 AM

获取location中key传值

获取location中key传值

GetQueryString : function (name) {
            var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)");
            var r = window.location.search.substr(1).match(reg);
            if(r!=null)return  decodeURI(r[2]); return "";
        }