我写了一个onmouseover事件,可我想当鼠标快速滑过的时候并不执行onmouseover事件,只有鼠标放上超过1秒再执行onmouseover事件应该怎么做?
解决方案 »
- 请问有用过js做行情报价(像股票报价),一秒刷几次,服务器会不会受不了?
- 连接数据库 DBHelper 使用静态 static 连接 sqlconnection static reader 是否出现错误
- ASP.net 真分页
- 关于 ScriptManager.RegisterClientScriptBlock
- GridView编辑数据库时简单又困惑的问题
- 如何使<ItemTemplate>一行固定显示几个?
- TreeView怎么实现选择啊?WEB
- 关于数组作为参数传递的问题
- http://www.yueyan.com/www_yueyan_com/webs/aspnetChat/default.asp 技术讨论聊天室。
- 使用Vs2008碰到的设置问题,求救!!
- 迷茫的职位选择,应该选择哪个那
- 怎么获得上一页的URL呢?
alert();
}
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title> by Bsing </title>
<meta name="keywords" content="" />
<meta name="description" content="" />
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="images/css.css" type="text/css" rel="stylesheet">
</head><body>
<a href="javascript:;" onmouseover="initializeFun();setTimeout('waitFun()',1*1000);" onmouseout="exitFun();">test</a>
<div id="al"></div>
<script>
var tmp = true;
function waitFun()
{
if (tmp)
{
alert(tmp);
}
}
function initializeFun(){ tmp =true; document.getElementById("al").innerHTML = "true"; }
function exitFun(){ tmp = false; document.getElementById("al").innerHTML = "false"; }
</script>
</body>
</html>
<!--
var secs
var timerID = null
var timerRunning = false
var delay = 1000function InitializeTimer()
{
// Set the length of the timer, in seconds
secs = 10
StopTheClock()
StartTheTimer()
}function StopTheClock()
{
if(timerRunning)
clearTimeout(timerID)
timerRunning = false
}function StartTheTimer()
{
if (secs==0)
{
StopTheClock()
// Here's where you put something useful that's
// supposed to happen after the allotted time.
// For example, you could display a message:
alert("You have just wasted 10 seconds of your life.")
}
else
{
self.status = secs
secs = secs - 1
timerRunning = true
timerID = self.setTimeout("StartTheTimer()", delay)
}
}
//-->
</SCRIPT>
var timer = 3000;
var x;
function a()
{
x = setTimeout('aa()',timer); }
function aa()
{
form1.img1.src = 'Images/unchecked.png';
window.clearInterval(x);
}
function bb()
{
window.clearTimeout(x);
form1.img1.src = "Images/checked.png";
}
<div onmouseover='ffff'/>
fff=function (){
var s=setTimeout(function(){
//do your work
clearTimeout(s);
},2*1000);
}