Wuu Posted July 27, 2009 Report Share Posted July 27, 2009 (edited) function delrow(r,table) { var i=r.parentNode.parentNode.rowIndex; document.getElementById(table).deleteRow(i); } <tr><td><a href="del" onclick="delrow(this,'comment_list'); return false;">Dzēst</a></td></tr> Kaut kas nav kārtība? Laikam this atsaucās uz <a> tāgu? Dzēst dzēš ,bet pašu augšējo! Edited July 27, 2009 by Wuu Quote Link to comment Share on other sites More sharing options...
0 Val Posted July 27, 2009 Report Share Posted July 27, 2009 hz, itkā strādā, kā vajag :> <script type="text/javascript"> function delrow(r,table) { var i=r.parentNode.parentNode.rowIndex; document.getElementById(table).deleteRow(i); } </script> <table id="comment_list"> <tr><td><a href="del" onclick="delrow(this,'comment_list'); return false;">Dzēst1</a></td></tr> <tr><td><a href="del" onclick="delrow(this,'comment_list'); return false;">Dzēst2</a></td></tr> <tr><td><a href="del" onclick="delrow(this,'comment_list'); return false;">Dzēst3</a></td></tr> <tr><td><a href="del" onclick="delrow(this,'comment_list'); return false;">Dzēst4</a></td></tr> </table> Quote Link to comment Share on other sites More sharing options...
Question
Wuu
Kaut kas nav kārtība? Laikam this atsaucās uz <a> tāgu? Dzēst dzēš ,bet pašu augšējo!
Edited by WuuLink to comment
Share on other sites
1 answer to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.