URL pass-through value:
Append after address? Key 1= value 1& key 2= value 2& key 3= value 3 ... (Note: This method will display the parameters in the address bar, the values passed in should not affect the security of the website and disclose the information inside the site)
<script type= "Text/javascript" >
The function takes a combination of key values from the URL and returns the value of the key by passing in the key parameterfunctionGETVL (name) {varReg =NewRegExp ("(^|\\?| &) "+ name +" = ([^&]*) (\\s|&|$) "," I "); if(Reg.test (LOCATION.HREF))returnUnescape (Regexp.$2.replace (/\+/g, "")); return""; }; OnLoad=function () { varAnthor = GETVL (' Anthor ');
varTOPIC = GETVL (' topic ');
varCreatetime = GETVL (' Createtime '));//Get ValuevarH3 = Document.createelement ("h3");//Create label
varH4 = Document.createelement ("H4"); varSP1 = document.getElementById (' SP1 ');//get ID for appropriate tag
varSP2 = document.getElementById (' SP2 ');
varSP3 = document.getElementById (' SP3 ')); H3.innerhtml=topic;//Fill a value in a label
Sp1.appendchild (H3);//Add the label as a child element to the corresponding element h4.innerhtml=Anthor;
Sp2.appendchild (H4); H4.innerhtml=createtime; Sp3.appendchild (H4); }; </script>
Use JavaScript to get the values in the URL and create the page elements