1 2 3 4 |
function getURLParameter(name) {
return decodeURIComponent(( new RegExp( '[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)' ).exec(location.search)||[, "" ])[1].replace(/\+/g, '%20' ))|| null ;
};
var token = getURLParameter( "token" );
|
标签:浏览器,name,getURLParameter,token,参数,地址栏 From: https://www.cnblogs.com/lvjinlin/p/18123691