简体   繁体   中英

How do I stop wait cursor when using setInterval

I have the following page that calls a javascript function (in this case, jsDoSomething ) every 2 seconds:

<html>
   <head>..stuff...</head>
   <body onload="jsBodyOnload()">
      ...body...

      <script>
         function jsBodyOnload() {
            setInterval(jsDoSomething,2000);
         }
      </script>
   </body>
</html>

Everything works fine, however for the duration setInterval runs the function jsDoSomething , the cursor changes to the wait cursor, then back to the default when done. How can I stop the cursor from changing everything this function runs? I would like to keep the cursor the same (being the default cursor) at all times on the page.

Thanks.

Turns out it is what jsDoSomething is doing. It's an XAJAX function, and there's an option in that class that allows me to turn off the wait cursor. For some reason, I got caught up in thinking it was setInterval.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM