当单击锚点标签时,如何添加另一个空的表单元素?
我使用了以下代码:
<div class="nav_left">
<form name="frm" action="#" method="post" onsubmit="return frm_onsubmit();">
<table>
<tbody><tr>
<td colspan="2"><h2 id="title">Add Time Group</h2></td>
</tr>
<tr>
<td><input name="action" id="action" value="add" type="hidden"></td>
</tr>
<tr>
<td colspan="2"><h5>Time Group<hr></h5></td>
</tr>
<tr>
<td><a href="javascript:void(null)" title="This will display as the name of this Time Group." class="info" >Description</a></td>
<td><input name="description" id="description" size="35" tabindex="1" value="" type="text"></td>
</tr>
<tr>
<td colspan="2"><h5>New Time<hr></h5></td>
</tr>
<tr><td colspan="2">
<table><tbody>
<tr><td>Time to start:</td><td>
<select name="hour_start">
<option value="" selected="">-</option>
<option value="01"> 01</option><option value="2"> 02</option><option value="3"> 03</option><option value="4"> 04</option><option value="05"> 05</option><option value="06"> 06</option><option value="07"> 07</option><option value="08"> 08</option><option value="09"> 09</option><option value="10"> 10</option><option value="11"> 11</option><option value="12"> 12</option><option value="13"> 13</option><option value="14"> 14</option><option value="15"> 15</option><option value="16"> 16</option><option value="17"> 17</option><option value="18"> 18</option><option value="19"> 19</option><option value="20"> 20</option><option value="21"> 21</option><option value="22"> 22</option><option value="23"> 23</option><option value="24"> 24</option>
</select> : 
<select name="minute_start">
<option value="00" selected=""> 00</option>
<option value="01"> 01</option><option value="02"> 02</option><option value="03"> 03</option><option value="04"> 04</option><option value="05"> 05</option><option value="06"> 06</option><option value="07"> 07</option><option value="08"> 08</option><option value="09"> 09</option><option value="10"> 10</option><option value="11"> 11</option><option value="12"> 12</option><option value="13"> 13</option><option value="14"> 14</option><option value="15"> 15</option><option value="16"> 16</option><option value="17"> 17</option><option value="18"> 18</option><option value="19"> 19</option><option value="20"> 20</option><option value="21"> 21</option><option value="22"> 22</option><option value="23"> 23</option><option value="24"> 24</option><option value="25"> 25</option><option value="26"> 26</option><option value="27"> 27</option><option value="28"> 28</option><option value="29"> 29</option><option value="30"> 30</option><option value="31"> 31</option><option value="32"> 32</option><option value="33"> 33</option><option value="34"> 34</option><option value="35"> 35</option><option value="36"> 36</option><option value="37"> 37</option><option value="38"> 38</option><option value="39"> 39</option><option value="40"> 40</option><option value="41"> 41</option><option value="42"> 42</option><option value="43"> 43</option><option value="44"> 44</option><option value="45"> 45</option><option value="46"> 46</option><option value="47"> 47</option><option value="48"> 48</option><option value="49"> 49</option><option value="50"> 50</option><option value="51"> 51</option><option value="52"> 52</option><option value="53"> 53</option><option value="54"> 54</option><option value="55"> 55</option><option value="56"> 56</option><option value="57"> 57</option><option value="58"> 58</option><option value="59"> 59</option>
</select>
</td></tr>
<tr><td>Time to finish:</td><td>
<select name="hour_finish">
<option value="" selected="">-</option>
<option value="01"> 01</option><option value="02"> 02</option><option value="03"> 03</option><option value="04"> 04</option><option value="05"> 05</option><option value="06"> 06</option><option value="07"> 07</option><option value="08"> 08</option><option value="09"> 09</option><option value="10"> 10</option><option value="11"> 11</option><option value="12"> 12</option><option value="13"> 13</option><option value="14"> 14</option><option value="15"> 15</option><option value="16"> 16</option><option value="17"> 17</option><option value="18"> 18</option><option value="19"> 19</option><option value="20"> 20</option><option value="21"> 21</option><option value="22"> 22</option><option value="23"> 23</option><option value="24"> 24</option>
</select> : 
<select name="minute_finish">
<option value="00" selected=""> 00</option>
<option value="01"> 01</option><option value="02"> 02</option><option value="03"> 03</option><option value="04"> 04</option><option value="05"> 05</option><option value="06"> 06</option><option value="07"> 07</option><option value="08"> 08</option><option value="09"> 09</option><option value="10"> 10</option><option value="11"> 11</option><option value="12"> 12</option><option value="13"> 13</option><option value="14"> 14</option><option value="15"> 15</option><option value="16"> 16</option><option value="17"> 17</option><option value="18"> 18</option><option value="19"> 19</option><option value="20"> 20</option><option value="21"> 21</option><option value="22"> 22</option><option value="23"> 23</option><option value="24"> 24</option><option value="25"> 25</option><option value="26"> 26</option><option value="27"> 27</option><option value="28"> 28</option><option value="29"> 29</option><option value="30"> 30</option><option value="31"> 31</option><option value="32"> 32</option><option value="33"> 33</option><option value="34"> 34</option><option value="35"> 35</option><option value="36"> 36</option><option value="37"> 37</option><option value="38"> 38</option><option value="39"> 39</option><option value="40"> 40</option><option value="41"> 41</option><option value="42"> 42</option><option value="43"> 43</option><option value="44"> 44</option><option value="45"> 45</option><option value="46"> 46</option><option value="47"> 47</option><option value="48"> 48</option><option value="49"> 49</option><option value="50"> 50</option><option value="51"> 51</option><option value="52"> 52</option><option value="53"> 53</option><option value="54"> 54</option><option value="55"> 55</option><option value="56"> 56</option><option value="57"> 57</option><option value="58"> 58</option><option value="59"> 59</option>
</select>
</td></tr>
<tr><td>Week Day Start:</td><td>
<select name="day_start">
<option value="">-</option><option value="Monday">Monday</option><option value="Tuesday">Tuesday</option><option value="Wednesday">Wednesday</option><option value="Thursday">Thursday</option><option value="Friday">Friday</option><option value="Saturday">Saturday</option><option value="Sunday">Sunday</option>
</select></td></tr>
<tr><td>Week Day finish:</td><td>
<select name="day_finish">
<option value="">-</option><option value="Monday">Monday</option><option value="Tuesday">Tuesday</option><option value="Wednesday">Wednesday</option><option value="Thursday">Thursday</option><option value="Friday">Friday</option><option value="Saturday">Saturday</option><option value="Sunday">Sunday</option>
</select></td></tr>
</tbody>
</table></td>
</tr> <tr>
<td colspan="2"><h6><input name="submit" tabindex="1" value="Submit" type="submit"></h6></td>
</tr>
</tbody>
</table><!-- end of table frm_timegroups -->
</form>
</td>
</tr>
</tbody></table>
</div>
<!--NAVIGATION ON LEFT-->
<!--NAVIGATION ON RIGHT-->
<div class="rnav">
<ul>
<li><a class="current" href="addgroup.php">Add Time Group</a></li>
<li><a class="current_validation" href="#">LINK 1 </a> </li>
</ul>
</div>
现在我需要创建另一个内部有空白字段的表单,当我点击LINK1时,它会被限制为一个,并且必须是相同的表单。
工作代码示例
name="submit"
,否则它会阻止任何脚本提交。你想创建哪些字段? - mplungjan