显示由用户填写的汇总表单

时间:2016-05-16 09:45:14

标签: javascript html

我在桌子上有一张表格。一些<td>标记包含文本,而一些标记包含<input>标记以从用户获取值。 用户填写了表格,现在提交,我想向他展示他给出的所有价值。

<table name='tab1' id='tab1'> 
           <tr>
               <td>Total Number Of Packets To Send : </td>
               <td><input type='text' name='noOfPacketsToSend' value='50000' size=7  pattern='^[0-9]{0,19}$' title = 'value must be not greater than 64 bits' required class='textbox'></td>
           </tr>
           <tr>
               <td>Number of Discrete Packets : </td>
               <td><input type='text' name='packets' value='100' size=7  pattern='^[0-9]{0,19}$' required class='textbox'></td>
           </tr>
           <tr>
               <td>Packet Rate</td>
           </tr>           
           <tr>
               <td>Packet Rate can Be either in MBPS or PPS:</td>
               <td><input type='radio' name='rate' value='Mbps' onchange='ppsDis()' id='Mbps r1'>MBPS</td>
               <td><input type='radio' name='rate' value='Pps' onchange='mbpsDis()' id='Pps r2'>PPS</td>

           </tr>
           <tr>
               <td><div id='Mbps1'>MBPS:<input type='text' name='Mbps' id='Mbps' value='0' pattern='^[0-9]{0,19}$' class='textbox'></div></td>
               <td><div id='Pps1'>PPS:<input type='text' name='Pps' id='Pps' value='0' pattern='^[0-9]{0,19}$' class='textbox'></div></td>
           </tr> 


           <tr>
               <td> VARY PACKET RATE :</td>
               <td> <input type='radio' name='varyPacketRate enable' value='yes' onchange='varyRateEn()' id='vary r1'>YES</td>
               <td> <input type='radio' name='varyPacketRate enable' value='no' checked onchange='varyRateDis()' id='vary r2'>NO</td>

           </tr>
           <tr>
               <td><div id='varyrate1' >START OFFSET :</div></td>
               <td><div id='varyrate2'> <input type='text' name='varyPacketRate startOffset' value='00D:00H:00M:00S' id='varyPacketRatestartOffset' size=15 required pattern='^[0-9]*D:([0-9]|[0-2][0-9])H:([0-9]|[0-5][0-9])M:([0-9]|[0-5][0-9])S$' class='textbox'></div></td>
           </tr>
           <tr>
               <td> <div id='varyrate3'>DURATION :</div></td>
               <td> <div id='varyrate4'> <input type='text' name='varyPacketRate duration' value='00D:00H:00M:00S' id='varyPacketRateduration' size=15 required pattern='^[0-9]*D:([0-9]|[0-2][0-9])H:([0-9]|[0-5][0-9])M:([0-9]|[0-5][0-9])S$' class='textbox' ></div></td>
           </tr>      
           <tr>
                <td> <div id='varyrate5'> OPTION RATE :</div></td>
                <td><div id='varyrate6'> <select name='varyPacketRate optionRate' id='varyPacketRateoptionRate' onchange='opRateChange()'>
                <option  value='BURST'>BURST</option>
                 <option  value='VARIABLE' selected>VARIABLE</option></div></td>
           </tr>
           <tr>
               <td><div id='varyrate7'>  HIGH RATE :</div></td>
               <td> <div id='varyrate8'> <input type='text' name='varyPacketRate highRate' id='varyPacketRatehighRate' value='0' size=3 required pattern='^[0-9]{0,19}$'></div></td>
           </tr>
           <tr>
               <td><div id='varyrate9'>  LOW RATE :</div></td>
               <td><div id='varyrate10'>  <input type='text' name='varyPacketRate lowRate' value='0' id='varyPacketRatelowRate' size=3 required pattern='^[0-9]{0,19}$'></div></td>
           </tr>
           <tr>
               <td> CALCULATE CHECKSUM :</td>
               <td> <input type='radio' name='calculateChecksum' value='yes' >YES</td>
              <td> <input type='radio' name='calculateChecksum' value='no' checked>NO</td>
          </tr>

           </table>

enter image description here

请参阅表格图片以便于理解。 我希望输出如下:

  

要发送的数据包总数:50000

依旧...... 请帮帮我

0 个答案:

没有答案