The following is a visit to Baidu and Google Speed test, how to get the two values saved into the save variable, and document.write (save); Output out, thank you!
<textarea id="runcode97312"><script language=javascript type=text/javascript> <!--var save= ""; var tim=1; SetInterval ("tim++", 10); var b=1; var autourl=new Array (); Autourl[1]= "www.baidu.com"; Autourl[2]= "www.google.com"; var autoname=new Array (); Autoname[1]= "Baidu"; autoname[2]= "Google"; function Butt () {document.write ("<form name=\" autof\ ">"); for (Var i=1;i<autourl.length;i++) {document.write (autoname[i]+ ": <input type=\" text\ "name=\" txt "+i+" \ "size=\ 20\ "value=\" Test ... \ ">"); } document.write ("</form>"); } butt (); function Auto (url,b) {document.forms[0]["TXT" +b].value= "Response Time:" +tim/100+ "SEC"} function run () {for (Var I=1;i<aut ourl.length;i++) {document.write (""); } run (); document.write (save); --> </SCRIPT></textarea>
[Ctrl + A All SELECT Note: If the need to introduce external JS need to refresh to perform]