The example of this article describes the method of getting the get value from JS. Share to everyone for your reference, specific as follows:
function Geturlparam (name)
{
var reg = new RegExp (^|&) + name + = ([^&]*) (&|$)); Constructs a regular expression object containing the target parameter
var r = window.location.search.substr (1). Match (reg);//Match target parameter
if (r!=null) return unescape (R[2]);
return null; Return parameter Value
}
More readers interested in JavaScript-related content can view this site: "JavaScript in the JSON Operation tips Summary", "JavaScript switching effects and techniques summary", "JavaScript Search Algorithm Skills summary", " JavaScript animation effects and tips Summary, "JavaScript Error and debugging skills Summary", "JavaScript data structure and algorithm skills summary", "JavaScript traversal algorithm and Skills summary" and "JavaScript Mathematical operation Usage Summary"
I hope this article will help you with JavaScript programming.