The code copy is as follows:
<pre name="code"><pre name="code"> <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. If used with .net, an error that cannot be called will be generated. </span></pre> Therefore, the name of the getResult()js method below should be changed to another name so that no other meaning will be created!
<pre></pre>
<pre name="code"> </pre><pre name="code"></pre><pre name="code">//Timely refresh flag
var refreshid="";//Please note that it is a global variable
function feelsh(){
//alert("Timed call method start");
refreshid=setInterval(getResult,1000);
}
//The method being called
function getResult(){
try{
var str=addFunctionName();//Return 1 if unsuccessfully
if(str=="1"){
return str;
}
clearInterval(refreshid);//Clear the timed service after success
}catch(e){
alert('Exception: '+e.description); // or alert('Exception: '+this.print(e)); // The advantage is that you can print out the error
}
return "";
}
function addFunctionName(){
return "1";
}</pre><br>
<br>
<pre></pre>
<pre name="code"> </pre><br>
<pre></pre>
</pre>