Copy Code code as follows:
<pre name= "Code" class= "JavaScript" ><pre name= "code" class= "JavaScript" > <span style= "Color:rgb" (58, 62 , 67); Font-family: ' Segoe ui Semibold ', ' Segoe UI ', ' Lucida Grande ', Verdana, Arial, Helvetica, Sans-serif; font-size:22px; line-height:27px; ">getresult is also available in. NET, and if used with. NET, it will produce an error that cannot be invoked." </span></pre> so the following GetResult () JS method name to be changed to another name, so as not to create other ambiguity!
<pre></pre>
<pre name= "Code" class= "JavaScript" > </pre><pre name= "code" class= "JavaScript" ></pre>< Pre name= "code" class= "JavaScript" >//timed Refresh Flag
var refreshid= "";//Note defined as global variable
function Felsh () {
Alert ("Timed call method Start");
Refreshid=setinterval (getresult,1000);
}
The method being invoked
function GetResult () {
try{
var str=addfunctionname ()//unsuccessful return 1
if (str== "1") {
return str;
}
Clearinterval (Refreshid)//Clean Time service after successful
}catch (e) {
Alert (' Exception: ' +e.description '); or alert (' Exception: ' +this.print (e));/The advantage is that you can print the error.
}
Return "";
}
function Addfunctionname () {
return "1";
}</pre><br>
<br>
<pre></pre>
<pre name= "Code" class= "JavaScript" > </pre><br>
<pre></pre>
</pre>