Mar 1, 2007 #1 dougalim Programmer Mar 1, 2007 23 US If I create a table with t=document.createElement('table') and then insert a row r=t.insertRow(0) how do you add onclick='func()' to the row?
If I create a table with t=document.createElement('table') and then insert a row r=t.insertRow(0) how do you add onclick='func()' to the row?
Mar 1, 2007 #2 kaht Programmer Aug 18, 2003 4,156 US Code: t.rows[0].onclick = function () { alert("hi"); }; -kaht Looking for a puppy? http://www.silkypups.com[small](Silky Terriers are hypoallergenic dogs that make great indoor pets due to their lack of shedding and small size)[/small] Upvote 0 Downvote
Code: t.rows[0].onclick = function () { alert("hi"); }; -kaht Looking for a puppy? http://www.silkypups.com[small](Silky Terriers are hypoallergenic dogs that make great indoor pets due to their lack of shedding and small size)[/small]