js| Insert | Dynamic <script language= "JavaScript" >
Constructors
function Instercell (tableid,content,place) {
Identification of the This.mtableid=tableid;//table
The content of This.minscontent=content;//inster
This.minsplace=place;//inster's Location
This.cinscell=inscell;
This.cclearcell=clearcell;
}
Insert
function Inscell () {
Str=eval (this.mtableid+ ". cells[" +this.minsplace+ "]);//This is not to write!
Str.innerhtml= ' <table cellspacing=\ ' 0\ ' cellpadding=\ ' 0\ ' border=\ ' 0\ ' ><tr> ';
This.mtableid.cells[this.minsplace].innerhtml=this.minscontent;
This.mtableid.cells[this.minsplace].innerhtml= ' </tr></table> ';
this.minsplace++;
}
Clear
function Clearcell () {
for (i=0;i<this.mtableid.cells.length/2-1;i++) {
This.mtableid.cells[2*i+1].innerhtml= "";
}
}
Str= ' <TD> Bank original balance </TD> ';
str+= ' <td><input type= ' text ' name= ' earning ' ></TD> ';
str+= ' <td><input type= ' text ' name= ' payout ' ></TD> ';
str+= ' <td><input type= ' text ' name= ' Cashonhand ' > </TD> ';
str+= ' <td><input type= ' text ' name= ' Cashonhandremark ' ></TD> ';
var ins=new instercell ("T1", "str", 1);
Ins.cinscell ();
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:
[email protected]
and provide relevant evidence. A staff member will contact you within 5 working days.