首页 新闻 会员 周边

IE 下div 档不住光标

0
悬赏园豆:50 [已解决问题] 解决于 2012-02-10 17:31
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head><title>
Home Page
</title>
<script type="text/javascript">
function Show() {
document.getElementById(
"b").style.display ="block";
}
</script>
</head>
<body>
<input name="ctl00$MainContent$a" type="text" id="MainContent_a" style="width:200px;"/>
<a onmouseover="Show(this)">点击我看效果</a>
<div id="b" style="width:200px; height:100px; position: absolute; top:0; background-color:Green; display:none;">
</div>
</body>
</html>



先点击输入框,然后移动鼠标去"点击我看效果"

你会发现弹出的div没有档住光标,求解决方法

这个问题IE6,IE8都有这个效果

FF,Chrome能档住光标,正常

ie
圣殿的主页 圣殿 | 初学一级 | 园豆:105
提问于:2012-02-10 16:57
< >
分享
最佳答案
0

这样改下Show方法

 function Show() {
document.getElementById("b").style.display ="block";
document.getElementById("b").focus();
}
收获园豆:50
LCM | 大侠五级 |园豆:6876 | 2012-02-10 17:08

谢谢

圣殿 | 园豆:105 (初学一级) | 2012-02-10 17:30
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册