javascript 获取url参数值

时间:2014-03-14 18:48:40   收藏:0   阅读:413
function getvl(name) {
var reg = new RegExp("(^|\\?|&)"+ name +"=([^&]*)(\\s|&|$)", "i");
if (reg.test(location.href)) return unescape(RegExp.$2.replace(/\+/g, " "));
return "";
};

javascript 获取url参数值,布布扣,bubuko.com

原文:http://www.cnblogs.com/mahatmasmile/p/3598888.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!