If setTimeout () is used to implement recursive calling, an error will occur if the first parameter is not enclosed in quotation marks. We will share with you how to solve the problem by using setTimeout () to implement recursive calling, if the first parameter is not enclosed in quotation marks, Firefox prompts setTimeout (): uselesssetTimeout call (missing quotes around argument ?) If the quotation marks are added, Firefox will prompt the undefined function.
Function refreshNum () {$. ajax ({type: "POST", url: "ajax/RefreshNum. ashx ", async: false, data :{}, success: function (data) {varnumArry = data. split (','); $. each ($ (". rush_left "), function (n) {detail (this).children().eq(0).html (numArry [n]) ;}); setTimeout (function () {refreshNum () ;}, 3000 ); // setTimeout ("refreshNum", 3000); // This will result in an error. For setTimeout () function parameters, do not use simple function calls, but use anonymous functions! Why don't you know?});} refreshNum ();