Change the mouse pointer using JavaScript

后端 未结 4 1468
别那么骄傲
别那么骄傲 2020-12-05 06:59

I wanted to use a script to change the mouse pointer on my website using JavaScript. It\'s better done by CSS but my requirement is of a script that can be distributed to ma

4条回答
  •  孤城傲影
    2020-12-05 07:28

    Look at this page: http://www.webcodingtech.com/javascript/change-cursor.php. Looks like you can access cursor off of style. This page shows it being done with the entire page, but I'm sure a child element would work just as well.

    document.body.style.cursor = 'wait';
    

提交回复
热议问题