<input type=
"button"
οnclick=
"fn()"
οndblclick=
"fun()"
value=
"点我"
>
<script language="javascript">
var
flag;
function aa(){
flag = false;
setTimeout(fn, 500);
function fn(){
if(flag != false) return;
alert("单击");
}
function fun(){
flag = true;
alert("双击");
}
</script>