Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Using InnerHTML to Add Dynamic Rows to Table

 
Alec Lee
Ranch Hand
Posts: 569
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to add some rows to a table dynamically. With DOM, I need to do many document.createElement() to create the <tr>,<td> and lots of other formatting elements. But is there a simplier way to do this? MSDN says .innerHTML for <tr> is readonly so I cannot simply modify this property.
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You have the option of using createElement or insertRow()/insertCell()

Eric
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic