Jump to content

Delete all rows


bijan

Recommended Posts

What you could do is add this to your 'table' tag.

id="tblRowDel"

And to access how many table rows there are, you do this:

x=document.getElementById("tblRowDel")x=x.getElementsByTagName("td")y=x.length

Now, you can use Y with your for loop. Y contains the number of TD's in your table. :)

Link to post
Share on other sites
What you could do is add this to your 'table' tag.
id="tblRowDel"

And to access how many table rows there are, you do this:

x=document.getElementById("tblRowDel")x=x.getElementsByTagName("td")y=x.length

Now, you can use Y with your for loop. Y contains the number of TD's in your table. :)

replace td with trtd are the cells tr are the rows which you asked for :)
Link to post
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...