帮助光标在Firefox浏览器中不工作 [英] Help Cursor is not working in the firefox browser

查看:296
本文介绍了帮助光标在Firefox浏览器中不工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

 < html> 

< head>
< title>问题< / title>
< script type =text / javascript>
function MouseOverHand(ID)
{
var Cursor ='hand';
var ID = ID;
if(!document.all){Cursor ='pointer'; }
document.getElementById(ID).style.cursor = Cursor;
}
< / script>
< script type =text / javascript>
function MouseOverHelp(ID)
{
var Cursor ='help';
var ID = ID;
if(!document.all){Cursor ='pointer'; }
document.getElementById(ID).style.cursor = Cursor;
}
< / script>
< / head>

< body>
< label id =Handonmouseover =MouseOverHand('Hand'); > Hand< / label>< br />< br />
< label id =Helponmouseover =MouseOverHelp('Help'); >帮助< / label>
< / body>

< / html>

在上面的html中用来将鼠标光标放在鼠标的标签上。这里的手和帮助光标在互联网浏览工作正常,但它不工作在firefox和其他浏览器



希望你的支持,

$ b $如果您可以指定 help c> / code>或直接像



getElementById(ID).style.cursor ='hand';

  document.getElementById(ID).style.cursor ='help'; 

请检查工作示例,并查看html源代码


<html>

<head>
<title>Question</title>
<script type="text/javascript" >
function MouseOverHand(ID)
{
var Cursor='hand';
var ID=ID;
if (!document.all){ Cursor='pointer'; }
document.getElementById(ID).style.cursor=Cursor;        
}
</script>
<script type="text/javascript" >
function MouseOverHelp(ID)
{
var Cursor='help';
var ID=ID;
if (!document.all){ Cursor='pointer'; }
document.getElementById(ID).style.cursor=Cursor;        
}
</script>
</head>

<body>
<label id="Hand" onmouseover="MouseOverHand('Hand');" > Hand </label><br/><br/>
<label id="Help" onmouseover="MouseOverHelp('Help');" > Help </label>
</body>

</html>

In the above html is used to take mouse cursor in the mouse over of label's. Here "Hand" and "help" cursor is working fine in internet explore but its not working in firefox and other browser's

hoping your support,

解决方案

you don't need var Cursor if you can specify help or hand directly like so

document.getElementById(ID).style.cursor='hand';        

and

document.getElementById(ID).style.cursor='help';        

please check working example and take a look at the html source code

这篇关于帮助光标在Firefox浏览器中不工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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