SetTimeOut or SetInterval trigger event fast
Here is my code
setInterval(function() {
$("#<%=cmbResCityStatEdit.ClientID%> option[text='"+ $( '#<%=lblCity.ClientID%>' ).text() +"']").attr("selected",true); $("#<%=cmbResCityStatEdit.ClientID%> option:sele开发者_StackOverflowcted").text()) },1);
time is in microsecond, so you are defining an interval of 1/1000th of second... and network overloading has no impact in this, since you are simply executing the code in your client after a delay.
P.s.: next time, please, ask a more clear question, I'm not even sure if my answer has been useful.
setTimeout and setInterval are exactly the same speed, they are different statements though. setTimeout will run your function after the timeout, setInterval will run it continuously after a set amount of time between each run.
精彩评论