A friend entrusted me to vote for him, the address is:
http://publish.sina.com.cn/04/13/413/search.php
The voting links are:
http://publish.sina.com.cn/poll.php?p_id=413&t_id=119
I did the following section of code, made Task Manager, every 1 minutes to open once, and then automatically close the window, but actually run down, but no effect, I do not know where the problem?
Copy Code code as follows:
<script language= "JavaScript" >
var checkfreq=1;//queue Check frequency, default 1 seconds check
var brun=false;//prevents 2 programs running at the same time
function Runurl (strurl,strfreq)
{
this.url=strurl;//the URL to run
this.freq=strfreq;//Operating Frequency
This.lastrun= ';//Last Run time
}
var runqueue = new Array ();
function Addrun (strurl,strfreq)//Add Run
{
if (strurl== ' | | strfreq== ') return
Runqueue[runqueue.length]=new Runurl (Strurl,strfreq)
}
function run (URL)//running URL
{
var xmlHttp;
if (window. XMLHttpRequest) xmlHttp = new XMLHttpRequest ();
else if (window. ActiveXObject) xmlHttp = new ActiveXObject ("Microsoft.XMLHTTP");
Xmlhttp.onreadystatechange = function () {brun=false;}
Xmlhttp.open ("Get", url, True);
Xmlhttp.send (NULL);
Brun=true;
}
function Checkrun ()//Check queue
{
var dtnow=new Date (), Objrun;
var tnow=dtnow.gettime ();
for (Var i=0;i<runqueue.length;i++)
{
Objrun=runqueue[i];
if (objrun.lastrun== ') Objrun.lastrun=tnow;
if (!brun&& (objrun.freq==0| | (Tnow-objrun.lastrun) >objrun.freq*1000))
{
Objrun.lastrun=tnow;
Run (Objrun.url);
}
}
}
Addrun (' http://publish.sina.com.cn/poll.php?p_id=413&t_id=119 ', 10);
SetInterval (' Checkrun () ', checkfreq*1000);//setinterval
</script>
<script language= "JavaScript" >
<!--
function Clock () {
I=i-1
Document.title= "after" +i+ "Minitues,this window would closed self!";
if (i>0) settimeout ("clock ();", 20000);
else {window.opener=null;self.close ();}
}
var i=2
Clock ();
-->
</script>
<ptml> <script language= "JavaScript" >//by ayi 2007-2-10 var checkfreq=1;//queue Check Frequency, default 1 sec check for Var brun=fals e;//prevents the simultaneous running of 2 program function Runurl (strurl,strfreq) {this.url=strurl;//running URL this.freq=strfreq;//Run frequency this.las Trun= ';//Last Run time} var runqueue = new Array (); function Addrun (strurl,strfreq)//Add run {if (strurl== ' | | strfreq== ') return runqueue[runqueue.length]=new Runurl (strurl,strfreq)} function run (URL)//run URL {var xmlHttp; if (window. XMLHttpRequest) xmlHttp = new XMLHttpRequest (); else if (window. ActiveXObject) xmlHttp = new ActiveXObject ("Microsoft.XMLHTTP"); Xmlhttp.onreadystatechange = function () {brun=false;} Xmlhttp.open ("Get", url, True); Xmlhttp.send (NULL); Brun=true; The function Checkrun ()//check queue {var dtnow=new Date (), Objrun; var tnow=dtnow.gettime (); for (Var i=0;i<runqueue.length;i++) {Objrun=runqueue[i]; if (objrun.lastrun== ') Objrun.lastrun=tnow; if (!brun&& (objrun.freq==0|| (Tnow-objrun.lastrun) >objrun.freq*1000)) {objrun.lastrun=tnow; Run (Objrun.url); }} addrun (' http://publish.sina.com.cn/poll.php?p_id=413&t_id=119 ', 10); SetInterval (' Checkrun () ', checkfreq*1000);//setinterval </script> <script language= "JavaScript" > <!- -function clock () {i=i-1 document.title= "after" +i+ "Minitues,this window'll closed self!"; if (i>0) settimeout ("clock ();", 20000); else {window.opener=null;self.close ();} var i=2 clock (); --> </script></ptml>
[Ctrl + A All SELECT Note: If the need to introduce external JS need to refresh to perform]