用html代码实现
当鼠标点左基叶面的时候,谈出“左基”
当鼠标点右基叶面的时候,谈出“右基”
然后2分钟后 叶面自动关闭!
------解决方案--------------------------------------------------------
<html>
<head>
<title> 无标题文档 </title>
<script language= "javascript ">
var i=10
function clickevent()
{
alert( "左基 ");
clock();
}
function clock(){
i=i-1
document.title= "本窗口将在 "+i+ "秒后自动关闭! ";
if(i> 0)setTimeout( "clock(); ",1000);
else self.close();}
</script>
</head>
<body onclick= "clickevent() ">
<div>
<table width= "1024 " height= "768 " border= "0 " cellpadding= "0 " cellspacing= "0 " bgcolor= "#000000 ">
<tr>
<td> </td>
</tr>
</table>
</div>
</body>
</html>
------解决方案--------------------------------------------------------
ie:
document.onclick // 左
document.oncontextmenu // 右
ff:
document.onclick = function(e) {
if (e.button == 2) { //右 }
}