国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 編程 > Java > 正文

JavaScri-pt實(shí)現(xiàn)動(dòng)態(tài)添加,刪除行的方法實(shí)例詳解

2019-11-02 15:43:37
字體:
供稿:網(wǎng)友

   本文實(shí)例講述了JavaScript實(shí)現(xiàn)動(dòng)態(tài)添加,刪除行的方法。分享給大家供大家參考。具體如下:

  ?

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <title>增加Table行</title> </head> <script language="javascript">// Example: obj = findObj("image1"); function findObj(theObj, theDoc){ var p, i, foundObj; if(!theDoc) theDoc = document; if( (p = theObj.indexOf("?")) > 0 && parent.frames.length) { theDoc = parent.frames[theObj.substring(p+1)].document; theObj = theObj.substring(0,p); } if(!(foundObj = theDoc[theObj]) && theDoc.all) foundObj = theDoc.all[theObj]; for (i=0; !foundObj && i < theDoc.forms.length; i++) foundObj = theDoc.forms[i][theObj]; for(i=0; !foundObj && theDoc.layers && i < theDoc.layers.length; i++) foundObj = findObj(theObj,theDoc.layers[i].document); if(!f
野兔影院[www.aikan.tv/special/yetuyingyuan/]
oundObj && document.getElementById) foundObj = document.getElementById(theObj); return foundObj;} //添加一個(gè)參與人填寫行 function AddSignRow(){ //讀取最后一行的行號,存放在txtTRLastIndex文本框中 var txtTRLastIndex = findObj("txtTRLastIndex",document); var rowID = parseInt(txtTRLastIndex.value); var signFrame = findObj("SignFrame",document); //添加行 var newTR = signFrame.insertRow(signFrame.rows.length); newTR.id = "SignItem" + rowID; //添加列:序號 var newNameTD=newTR.insertCell(0); //添加列內(nèi)容 newNameTD.innerHTML = newTR.rowIndex.toString(); //添加列:姓名 var newNameTD=newTR.insertCell(1); //添加列內(nèi)容 newNameTD.innerHTML = "<input name='txtName" + rowID + "' id='txtName" + rowID + "' type='text' size='12' />"; //添加列:電子郵箱 var newEmailTD=newTR.insertCell(2); //添加列內(nèi)容 newEmailTD.innerHTML = "<input name='txtEMail" + rowID + "' id='txtEmail" + rowID + "' type='text' size='20' />"; //添加列:電話 var newTelTD=newTR.insertCell(3); //添加列內(nèi)容 newTelTD.innerHTML = "<input name='txtTel" + rowID + "' id='txtTel" + rowID + "' type='text' size='10' />"; //添加列:
發(fā)表評論 共有條評論
用戶名: 密碼:
驗(yàn)證碼: 匿名發(fā)表
主站蜘蛛池模板: 肇源县| 株洲县| 顺平县| 永定县| 吐鲁番市| 泽库县| 北安市| 大安市| 湛江市| 湖北省| 嘉善县| 藁城市| 宜春市| 田林县| 信丰县| 犍为县| 大理市| 久治县| 扶风县| 林口县| 鄄城县| 沭阳县| 奇台县| 龙游县| 裕民县| 收藏| 西华县| 石棉县| 塔城市| 昌都县| 普洱| 盐津县| 潞西市| 武城县| 五指山市| 荣成市| 垦利县| 克拉玛依市| 灵寿县| 临夏市| 陈巴尔虎旗|