JS创建自定义表格

来源:互联网 发布:售楼调价软件 编辑:程序博客网 时间:2024/09/21 09:25

JS部分:

 

function next() {

    //得到table对象

    var oTable = document.getElementById("table1");

    //插入tr

    var oTr = oTable.insertRow();

    //一行tr插入3个td
    var oTd1 = oTr.insertCell();
    var oTd2 = oTr.insertCell();
    var oTd3 = oTr.insertCell();

    //指定td内容
    oTd1.innerHTML = "@process_time显示处理某个页面所需要的时间";  
    oTd2.innerHTML = "无需设置参数"; 
    oTd3.innerHTML = "无需设置参数值";

}

 

JSP:

         <table style="width:700px;" id="table1">
               <thead >
                     <tr>
                         <th>
                          参数描述
                     </th>
                     <th>
                          包含此参数
                     </th>
                     <th>
                          参数值
                     </th>
                     </tr>
               </thead>

         </table>

0 0
原创粉丝点击