在Javascript或jQuery中更改鼠标光标 [英] Change mouse cursor in Javascript or jQuery
本文介绍了在Javascript或jQuery中更改鼠标光标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在Javascript或jQuery中更改鼠标光标?我知道这是一个非常经典的问题,但很奇怪,这JSFiddle不工作: http://jsfiddle.net/2Qffw/ 。
How can I change the mouse cursor in Javascript or in jQuery ? I know it's a very classic question, but very strangely this JSFiddle doesn't work : http://jsfiddle.net/2Qffw/.
以下是代码:
$('body').css('cursor','pointer');
document.body.style.cursor = "pointer";
推荐答案
在 html
和正文
:
$('html,body').css('cursor','crosshair');
这篇关于在Javascript或jQuery中更改鼠标光标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文