使用JavaScript动态更改光标 [英] Changing the cursor dynamically using JavaScript

查看:142
本文介绍了使用JavaScript动态更改光标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个数字SVG,我正在尝试鼠标悬停事件,将光标样式更改为手。


我试图这样做:


var figure = document.embeds [''SVG'']。getSVGDocument()。getElementById(elementId);


figure.style.cursor = hand;


感谢您的帮助

I have a figure SVG, and i′m trying to on mouseover event, change the cursor style to "hand".

I tried to do this:

var figure= document.embeds[''SVG''].getSVGDocument().getElementById(elementId);

figure.style.cursor = "hand";

thanks for the help

推荐答案

尝试使用关键字''指针''代替' '手''。这应该是标准的,应该适用于大多数浏览器。


Jon
Try using the keyword ''pointer'' instead of ''hand''. This is supposed to be the standard and should work on most browser.

Jon


它不起作用......

和奇怪的是没有任何反应...

没有错误...而且没有...指针或手
it doesn′t work...
and the strange thing is that nothing happens...
no error...and no ...pointer or hand


什么''什么是elementid?你指的是哪个元素?
What''s elementid? Which element are you referring to?


这篇关于使用JavaScript动态更改光标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆