标签:null || define exp val == get regex location
function getparms(name) {
var regex = new RegExp("[?&]" + encodeURIComponent(name) + "\\=([^&#]+)");
var value = (location.search.match(regex) || ["", ""])[1];
if (value === ‘undefined‘ || value === ‘null‘) value = ‘‘;
return decodeURIComponent(value);
};
标签:null || define exp val == get regex location
原文地址:https://www.cnblogs.com/yazhng/p/8949873.html