最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - How can I change mouse pointer icon on a web page? - Stack Overflow

programmeradmin1浏览0评论

Is there any way to change mouse pointer icon using javascript(or any other method) when I hover it on a normal text on which I want it to appear like a hand as with links on a webpage.

Is there any way to change mouse pointer icon using javascript(or any other method) when I hover it on a normal text on which I want it to appear like a hand as with links on a webpage.

Share Improve this question asked Feb 19, 2012 at 6:29 Aishwarya ShivaAishwarya Shiva 3,41616 gold badges61 silver badges112 bronze badges
Add a ment  | 

3 Answers 3

Reset to default 4

See http://www.w3schools./cssref/pr_class_cursor.asp

Using css:

div { cursor:pointer; }

Look up the css attribute cursor.

It's the best way to do it.

You could use like:


onmouseover="this.style.cursor = 'hand';"  //on mouse over
onmouseout="this.style.cursor = 'auto';"  // on mouse out

发布评论

评论列表(0)

  1. 暂无评论