pein0119's blog
一个小函数,用来获取当前url中的参数的值
123456789101112
function getUrlParam(param) { var urlParam = window.location.search.substring(1).split('&') var len = urlParam.length; for (var i = 0; i < len; i++) { if (param === urlParam[i].split('=')[0]) { return urlParam[i].split('=')[1]; } } return null;}