JS Get URL param

$.urlParam = function (name) {
var results = new RegExp('[\\?&]' + name + '=([^&#]*)').exec(window.location.href);
return results[1] || 0;
}

 

此方法来自: 

http://nack.co/get-url-parameters-using-jquery/   特别感谢

posted @ 2013-06-13 11:17  shzy2012  阅读(371)  评论(0编辑  收藏  举报