<div style='background: #CCCCCC; width: 200px; height: 200px' onclick='var target = event.target || events.srcElement; if (event.target != this) return; this.style.backgroundColor = "red";'> <a href='javascript://'>Click</a></div> <table width=100% bgcolor='#ebebeb' border=1> <tr onclick='var target = event.target || events.srcElement; if (event.target != this) return; this.style.backgroundColor = "red";'> <td>text</td> <td id=tt onclick="null"><a href='pict.jpg' target="_blank">pict.jpg</a></td> </tr> </table>
<table width=100% border=1> <tr style='background: red' onclick='if (event.target.tagName != "TD") return; this.style.backgroundColor = "black";'> <td>text</td> <td id=tt><a href='javascript://'>pict.jpg</a></td> </tr> </table>