求 点击一链接打开个层,鼠标移开十秒后关闭,或者点击页面其它地方关闭层 是要鼠标移上对象,就出现备注效果吗?请参考title属性例:<input title="备注信息"> 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 是title,就像http://bt3.btchina.net那样,点击一个链接就会打开一个层,然后点其它地方就消失,可是我不知道怎么写 这个方法如果页面上元素比较少还可以用用,太多的话容易起冲突,不易使用<body ><div id=div1 height="400" width="200" style="display:none;background-color:ff0000" onmouseout="window.setTimeout('hidddiv()',10000)">sdfsdfsdfsdf</div><input name=button1 type=button value="按" onclick="showdiv()"><script>function hidddiv(){ document.getElementById('div1').style.display='none';}function showdiv(){ document.getElementById("div1").style.display='';}document.body.onmousedown=function keydown(){if((event.srcElement.id!='div1')&&(event.srcElement.name!='button1')){document.getElementById('div1').style.display='none'}}</script></body> 谁能详细解释下下面的代码含义 新手,求助。。。谢谢了! 网站天气JS首页显示的问题. $和getElementById的区别 决断radio选中问题 100求一简单正则表达式应用 子窗口关闭时,刷新父窗口,怎么写呀! 一个很简单的网页问题 浮动并定位的问题?一定送分 怎样把某网页设置成浏览器的主页(当然,是要用程序来实现的)................. 函数调用的参数问题 函数重载?
<body >
<div id=div1 height="400" width="200" style="display:none;background-color:ff0000" onmouseout="window.setTimeout('hidddiv()',10000)">
sdfsdfsdfsdf
</div>
<input name=button1 type=button value="按" onclick="showdiv()">
<script>
function hidddiv()
{
document.getElementById('div1').style.display='none';
}
function showdiv()
{
document.getElementById("div1").style.display='';
}
document.body.onmousedown=function keydown(){if((event.srcElement.id!='div1')&&(event.srcElement.name!='button1')){document.getElementById('div1').style.display='none'}}
</script>
</body>