Then I have x form page, now, and want to make the value of the above and fill out the form automatically when open the page,
,,,,,,,, and so on,,,
Then the lx values can automatically fill in separately to the front three forms,,,
Js, how to make? Have to be not done for a long time,,,,
CodePudding user response:
Js to get the url? At the back of the parameter selectionVar url=location. The search;//get the url "?" Following the string
Var theRequest=new Object ();
If (url. IndexOf ("?" )!=1) {
Var STR=url. Substr (1);
STRS=STR. Split (" & amp;" );
For (var I=0; I & lt; STRS. Length; I + +) {
TheRequest [STRS [I]. The split ("=") [0]]=unescape (STRS [I] the split ("=") [1]).
}
}
The console. The log (theRequest);
CodePudding user response:
The