This article mainly introduces the success of JS timed call method and stop the implementation of the call, the need for friends can refer to the following
Code is 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); } // Invoked method function GetResult () { try{ var str=addfunctionname ();//unsuccessful return 1 if (str== "1") { Return str; } clearinterval (Refreshid);//Clear Timer service }catch (e) { alert (' Exception: ' + E.description); or alert (' Exception: ' +this.print (e));The advantage is that you can print out the wrong typing } return ""; } function Addfunctionname () { "1"; }</pre ><br> <br> <pre></pre> <pre name= "code" class= "JavaScript" > </ pre><br> <pre></pre> </pre>