my HTML code ...
and my JS code ..
Now my question is ... inside handle function this says the current clicked TD cell..how? As it supposed to say TDClass object itself.
Please explain..
Code:
<table border="0" cellpadding="0" cellspacing="0"> <tr> <td id=tabbed_TD>Debasis Jana</td> </tr> </table>
Code:
function TDClass(){
this.handle = function(){
alert(this);
}
}
function test(){
document.getElementById('tabbed_TD').addEventListener('click',new TDClass().handle,false);
}
Please explain..
Comment