Dom (vii) using the DOM control table

Source: Internet
Author: User

1. Insert a row

<Scripttype= "Text/javascript">window.onload=function(){    varOTr=document.getElementById ("member"). InsertRow (2); //Insert a row    varAtext= NewArray (); atext[0] =document.createTextNode ("Fresheggs"); atext[1] =document.createTextNode ("W610"); atext[2] =document.createTextNode ("Nov 5th"); atext[3] =document.createTextNode ("Scorpio"); atext[4] =document.createTextNode ("1038818");  for(varI=0; I<Atext.length;i++){        varoTd=Otr.insertcell (i);    Otd.appendchild (Atext[i]); }}</Script><Tableclass= "DataList"Summary= "List of members in EE Studay"ID= "Member">    <caption>Member List</caption>    <TR>        <thScope= "Col">Name</th>        <thScope= "Col">Class</th>        <thScope= "Col">Birthday</th>        <thScope= "Col">Constellation</th>        <thScope= "Col">Mobile</th>    </TR>    <TR>        <TD>Isaac</TD>        <TD>W13</TD>        <TD>June 24th</TD>        <TD>Cancer</TD>        <TD>1118159</TD>    </TR>    <TR>        <TD>Girlwing</TD>        <TD>W210</TD>        <TD>SEP 16th</TD>        <TD>Virgo</TD>        <TD>1307994</TD>    </TR>    <TR>        <TD>Tastestory</TD>        <TD>W15</TD>        <TD>Nov 29th</TD>        <TD>Sagittarius</TD>        <TD>1095245</TD>    </TR></Table>

Dom (vii) using the DOM control table

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.