您的位置:首页 > 其它

firefox 与 Ie 鼠标事件区别

2008-07-24 17:30 375 查看
Mozilla与IE在事件模型上略有差异

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title> New Document </title>
<meta name="Generator" content="EditPlus">
<meta name="Author" content="Seagle.K">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<script language="JavaScript">
var ie = window.navigator.appVersion.indexOf('MSIE')==-1?false:true;
window.document.onmousedown = function(e)
{
var e = ie?window.event:e;
var b = ie?e.button:e.which;
if (b == 1)
{
alert("Left Button");
}
}
</script>
</head>
<body>
</body>
</html>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: