简体   繁体   中英

Adding New Row To HTML Table

I just wanna ask how can I add a new row to an HTML table?

The first column should have a select tool and the second column should have a text box. Like there's a button below the table that when clicked, a new row will be added to the table. I really don't know how so perhaps can you give me a sample code? Thank you in advance!

There are several ways using DOM and javascript: just a search on google: http://www.codeproject.com/KB/scripting/DHTMLGrid.aspx http://www.mredkj.com/tutorials/tableaddrow.html

<tr>[whatever you need]</tr>

Of course, it would be better if you could describe your situation better. Considering that 'PHP' tag is there.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM