Gets the parameters html page

			function getUrlParam (name) {// packaging method 
				var reg = new RegExp ( "( ^ | &)" + name + "= ([^ &] *) (& | $)"); // a structure containing the target parameter the regular expression object 
				var r = window.location.search.substr (1) .match (reg); // parameter matches the target 
				IF (! R & lt = null) return unescape (R & lt [2]); 
				return null; // return value 
			}

  

var code = getUrlParam ( 'code') // code path taken

Guess you like

Origin www.cnblogs.com/aln0825/p/11440199.html