2010-03-16 120 views
0

嗨万一整页提交trasparent div id来改变光标'等待'。现在,当页面被提交并且新页面出现时,光标仍然保持'等待'不变为默认状态,直到鼠标移动到Firefox中为止JavaScript的鼠标光标更改页面加载在Firefox浏览器3.5

这里是简单的html点击显示按钮div当用户将鼠标移到div光标正在改变为等待光标。现在,当这个页面被再次加载按F5光标停留在Firefox中等待光标在IE它的做工精细,有没有办法使光标默认的页面加载在Firefox

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"> 
<head> 
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> 
    <title>Untitled Document</title> 
    <style> 
     body { 
      cursor:default; 
     } 
    </style> 
    <script src="js/jquery.js"> </script> 
    <script> 
     var test = true; 
     $(document).ready(function() { 
      $('#maindiv').css('display','none') 
     }); 
     function showDiv() { 
      $('#maindiv').css('display','block') 
     } 
    </script> 
</head> 
<body> 
    <div id="divBody" style="background-color:red;width:500px;height:500px" >aa 
     <div id="maindiv" style="background-color:#999999;height:100$;width:400px;height:400px;cursor:wait"> 
      sss 
     </div>aa 
    </div> 
    <input type="button" value="show" onclick="showDiv()"/> 
</body> 
</html> 
+3

验证。验证。验证。 http://validator.w3.org/ – Quentin 2010-03-16 11:12:46

+0

我想这个问题已经有一个bug报告了:[bugzilla](https://bugzilla.mozilla.org/show_bug.cgi?id=511151) – 2010-03-17 06:49:52

回答

0

你可以使用一个动画形象,给用户反馈而不是改变光标?

ajaxload.info有一些很好的例子。

0

这就是一些乱码......

为什么不使用图片或者CSS对一切与透明背景和cursor: wait;在你的CSS或样式标签的顶部显示一个div然后显示该div当过你希望...

HTML <div id="modal">&nbsp;</div> <input id="test" type="text" />

JQuery的

$('#modal').css({cursor: 'wait'}).width($(document).width()).height($(document).height()); 
$('#test').bind('click',function(){$('#modal').show()}) 

我还没有测试,所以......在理论上它应该工作...如果不尝试改变车身宽度和高度为“100%”

照顾