<h1>使用 if 控制 UI 的表單進行-表單填寫</h1> <form id='myform' > <table> <tr> <td>Account: </td> <td><input type="text" name="myaccount" size="20" /></td> <td>*<span id="myaccountid"></span></td> </tr> <tr> <td>Name: </td> <td><input type="text" name="myname" size="20" /></td> <td>*<span id="mynameid"></span></td> </tr> <tr> <td>Tel: </td> <td><input type="text" name="mytel" size="20" /></td> <td>*<span id="mytelid"></span></td> </tr> <tr> <td>Gender: </td> <td> <label><input type="radio" name="mygender" value="boy" />boy</label> <label><input type="radio" name="mygender" value="girl" />girl</label> <label><input type="radio" name="mygender" value="unknown" />no answer</label> </td> <td>*<span id="mygenderid"></span></td> </tr> <tr> <td colspan="3"><input type="submit" value="上傳" /></td> </tr> </table> </form>