js file
function gotClick(event,msg,obj){
var object;
var msgs = msg " => clicked Got it!
";
try{
if (event.target) {//Mozilla
object = event.target;
// alert(document.getElementById(object. id).nodeName " Mozilla " msg);
document.getElementById('result').innerHTML =msgs;
// event.cancelBubble=true;//Block delivery
}
else if (event.srcElement){//IE
object = event.srcElement;
// alert(object.id " IE " msg);
// event.cancelBubble=true;//Block delivery
document.getElementById('result').innerHTML =msgs;
}
}catch(e){
alert(e);
}
}
The operation result is:
Button => was clicked!
td => was clicked!
tr => was clicked!
table => was clicked!