<!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="">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT=""></HEAD><BODY>
<form name=form_1>
<table id="tab1" >
<tr>
<td class="head" width="30%"><FONT face="MS UI Gothic">2222</FONT></td>
<td class="cent">
222222222222
</td>
<td class="cent">
22222222
</td>
</tr>
</table>
<script type="text/javascript" language="javascript">
var a=document.getElementById("tab1")
a.onmouseover=function (){alert("11111")}
</script>
</form></BODY>
</HTML>
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT=""></HEAD><BODY>
<form name=form_1>
<table id="tab1" >
<tr>
<td class="head" width="30%"><FONT face="MS UI Gothic">2222</FONT></td>
<td class="cent">
222222222222
</td>
<td class="cent">
22222222
</td>
</tr>
</table>
<script type="text/javascript" language="javascript">
var a=document.getElementById("tab1")
a.onmouseover=function (){alert("11111")}
</script>
</form></BODY>
</HTML>
把a.onmouseover=function (){alert("11111")}改成a.onmousedown=function (){alert("11111")}
提示://可以用addEventLister()//
我记得addEventLister好象只有flash才有吧?
楼上的,在javascript中也是有的,下面是转帖的,应该是meizz写的
if(!window.attachEvent && window.addEventListener)
{
Window.prototype.attachEvent = HTMLDocument.prototype.attachEvent=
HTMLElement.prototype.attachEvent=function(en, func, cancelBubble)
{
var cb = cancelBubble ? true : false;
this.addEventListener(en.toLowerCase().substr(2), func, cb);
};
}