总结二

今天学到了一些新知识,第一,认识了skype聊天工具,以前未接触过,今天自己申请了一个skype号;第二,学会了安装svn,如何使用它;第三,做事情,静下心来可以做好很多事,学到很多东西;第四,今天在js脚本中学到一个函数“insertRow(index)”,它用于在table表中增加行数,index表示需要增加的行数。

示例:

<table id="product_table" border="1">
            <tr>
                <td >Product Name</td>
                <td >Qty</td>
            <td >Price</td>
            </tr>
<tr><td><input type="text"  name="product_name"/></td><td><input type="text" name="qty"/></td><td><input type="text" " name="price"/></td></tr>
        </table>
        <button type="button" onClick="displayResult()">Insert new row</button>

js:

 function displayResult()
        {
var product_html='<td><input type="text"  name="product_name"/></td><td>

            <input type="text" name="qty"/></td><td>

            <input type="text" " name="price"/></td>
            document.getElementById("product_table").insertRow(-1).innerHTML = product_html;
        }

原文地址:https://www.cnblogs.com/yunlongcheng/p/3460661.html