title: javascript onclick custom cursor
body: <p>I have been using: </p>
  
  <pre><code>    &lt;script&gt;
  function change()
  {
  document.body.style.cursor="url('xx/xx.cur'),auto";
  }
  &lt;/script&gt;
  
  &lt;div onClick="change()"&gt;&lt;/div&gt;
  </code></pre>
  
  <p>It works, but its important that the cursor resets while there is no click so i tried the onBlur, but it didnt work.</p>
  
  <p>At last I found this:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt; 
     function change() { 
     document.body.style.cursor=(document.body.style.cursor=="help") ? "default" : "help"; 
  } 
  &lt;/script&gt; 
  &lt;/head&gt; 
  &lt;body&gt; 
  &lt;div onmousedown="change()" onmouseup="change()"&gt;  &lt;/div&gt; 
  </code></pre>
  
  <p>which works like a charm, but it failed to replace the cursor standard styles with custom .curs.</p>
  
  <p>Here:</p>
  
  <pre><code>    function change()
  {
  document.body.style.cursor=(document.body.style.cursor=="url ('xx/xx3.cur')") ? "url ('xx/xx1.cur')" : "url ('xx/xx3.cur')";
  }
  &lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
  
  &lt;div onmousedown="change()" onmouseup="change()" id="container"&gt;
  </code></pre>
  
  <p>Obviously the double parentheses are troublesome. I tried everything without success. Any help apreciated.
  Thanks in advance.</p>