Copy Code code as follows:
function GetObject (objectId) {
if (document.getElementById && document.getElementById (objectId)) {
return document.getElementById (OBJECTID);
else if (document.all && document.all (objectId)) {
return document.all (OBJECTID);
else if (document.layers && Document.layers[objectid]) {
return Document.layers[objectid];
} else {
return false;
}
}
function Get (p) {
var Url=location.search;
var url= document. Url.tostring ();
var tmpstr=p+ "=";
var tmp_reg=eval ("/[\?&]" +tmpstr+ "/I");
if (Url.search (Tmp_reg) ==-1) return null;
else{
var a=url.split (/[\?&]/);
for (Var i=0;i<a.length;i++)
if (A[i].search (eval ("/^" +tmpstr+ "/I")!=-1) return a[i].substring (tmpstr.length);
}
}
Window.onload=function () {
GetObject ("key"). Value = Get ("K");
Key as the name of input, the value received is the browser in the K parameter
K is the name of the parameter in the browser
}
The above code is placed at the bottom of the HTML page