<html>
<head>
<title>s</title>
</head>
<script type="text/javascript">
function hello()
{
alert("ds");
}
function ss()
{
ct=window.setTimeout("hello()", 2000);
}
function dd()
{
window.clearTimeout(ct)
}
</script>
<BODY >
<table>
<tr>
<td onmouseover="ss()" onmouseout="dd()">
sdf</td>
<td>sfdsfs</td>
</tr>
<tr>
<td>dfs</td>
<td>ghf</td>
</tr>
</table>
</BODY>
</html>
转载于:https://www.cnblogs.com/j3eee/archive/2009/09/22/1571610.html
本文介绍了一种使用JavaScript实现鼠标悬停显示弹窗的方法,通过设置延时和清除延时函数,实现了当鼠标悬停在指定元素上时,弹窗会在两秒后出现,鼠标移开后弹窗消失的效果。

被折叠的 条评论
为什么被折叠?



