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

首頁 > 網(wǎng)站 > 建站經(jīng)驗(yàn) > 正文

JavaScrip!t實(shí)現(xiàn)動態(tài)添加,刪除行的方法實(shí)例詳解

2019-11-02 14:16:19
字體:
供稿:網(wǎng)友

   本文實(shí)例講述了JavaScript實(shí)現(xiàn)動態(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(!foundObj && document.getElementById) foundObj = document.getElementById(theObj); return foundObj;} //添加一個參與人填寫行 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);
發(fā)表評論 共有條評論
用戶名: 密碼:
驗(yàn)證碼: 匿名發(fā)表
主站蜘蛛池模板: 玉田县| 庆城县| 丽水市| 美姑县| 博野县| 铜山县| 专栏| 宁国市| 丁青县| 肇庆市| 拉萨市| 莒南县| 温泉县| 探索| 威信县| 威宁| 枞阳县| 嫩江县| 兴安县| 武强县| 大新县| 文化| 钟祥市| 剑川县| 临漳县| 都昌县| 东平县| 安仁县| 沾益县| 民勤县| 海盐县| 临清市| 开化县| 墨脱县| 平果县| 盐城市| 定远县| 平邑县| 平湖市| 饶阳县| 麻江县|