event.target
event.target.tagName
event.target.parentNode
event.target.className

解决方案 »

  1.   

    是吗?在netscape上可不可以实现onclick时变化一行的样式表,怎么实现
      

  2.   

    不是可以的嘛!tmd,就这么写东西要写这么多!mozilla1.4 PASS<html>
    <head>
    <style type="text/css">
    .c1 { color:red;}
    .c2 { color:blue;}
    </style>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    </head>
    <body onclick="with(event.target)className=className=='c1'?'c2':'c1'">
    <table border="1">
    <tr>
    <td class="c1">操你妈!垃圾浏览器!netscape!mozilla!opera!</td>
    </tr>
    </table>
    </body>
    </html>
      

  3.   

    mozilla 1.4 pass!
    写这么些东西,用了好长时间
    <html>
    <head>
    <style type="text/css">
    .c1 { color:red;}
    .c2 { color:blue;}
    </style>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    </head>
    <body onclick="with(event.target)className=className=='c1'?'c2':'c1'">
    <table border="1">
    <tr>
    <td class="c1">操你妈!垃圾浏览器!netscape!mozilla!opera!</td>
    </tr>
    </table>
    </body>
    </html>
      

  4.   

    netscape 7.0 测试,只现实红色