title: Change cursor back to auto after unload
body: <p>I am editing a page that was created by somebody else. And this page has the <code>onbeforeunload</code> value set for <code>body</code> that calls for a function which changes the cursor to wait. So when a user clicks on a button, it displays the wait cursor, but if a user clicks cancel right afterwards, the cursor remains being <code>wait</code>. How do I make it go back to auto/default?</p>
  
  <p>The body tag code:</p>
  
  <pre><code>&lt;body onbeforeunload="showHourglass();"&gt;
  </code></pre>
  
  <p>JS function</p>
  
  <pre><code>function showHourglass() {
              document.body.style.cursor = 'wait';
          }
  </code></pre>