for IE/FF-----
<input type=button value=test2 onmousedown="foo(event,this);">
<SCRIPT srccccc="css/layout.js" type=text/javascript>//新层的定义
document.getElementById("aaa").onmousedown = function(event){foo(event||window.event,this)};function foo(e,obj)
{
alert(e);
alert(obj.value)}
</SCRIPT>

解决方案 »

  1.   

    <input type=button value=test1 id=aaa>
    <input type=button value=test2 onmousedown="foo(event,this);">
    <SCRIPT srccccc="css/layout.js" type=text/javascript>//新层的定义
    document.getElementById("aaa").onmousedown = function(event){foo(event||window.event,this)};function foo(e,obj)
    {
    alert(e);
    alert(obj.value)}
    </SCRIPT>
      

  2.   

    行了 谢谢了 JK_10000(JK) ( ) 信誉:121   不过还是想知道用addEventListener 该怎么写