標籤:方式 pass submit add tar 乒乓球 option tle 連結
<!DOCTYPE html><html><head lang="en"> <meta charset="UTF-8"> <title>table</title> <style> table{ border-collapse: collapse; } tr{ border: 1px solid red; } td{ border: 1px dashed blue; } </style></head><body><table border="1"> <tr> <!--colspan橫向合并列--> <td colspan="2">1-1</td> <td>1-2</td> <!--<td>1-3</td>--> </tr> <tr> <td rowspan="2">2-1</td> <td>2-2</td> <td>2-3</td> </tr> <tr> <!--<td>3-1</td>--> <td>3-2</td> <td>3-3</td> </tr></table><hr/><table> <tr> <td colspan="4" align="right">123</td> </tr> <tr> <td>AC</td> <td>+/-</td> <td>%</td> <td>/</td> </tr> <tr> <td>7</td> <td>8</td> <td>9</td> <td>x</td> </tr> <tr> <td>4</td> <td>5</td> <td>6</td> <td>-</td> </tr> <tr> <td>1</td> <td>2</td> <td>3</td> <td>+</td> </tr> <tr> <td colspan="2">0</td> <td>.</td> <td>=</td> </tr></table><hr/><!--cellspacing 列與列之間 儲存格間距 cellpadding 儲存格內邊距--><table border="1" cellspacing="10" cellpadding="5"> <!--caption表名 標題--> <caption>XX公司人員</caption> <tr> <!--th表頭--> <th>姓名</th> <th>性別</th> <th>職位</th> <th>備忘</th> </tr> <tr> <td>張三</td> <td>男</td> <td>小賣部</td> <td> </td> </tr> <tr> <td>李四</td> <td>男</td> <td>保潔</td> <td> </td> </tr></table><!--action 連結外部路徑、地址 method 提交方式 get post disabled禁用 autofocus自動擷取焦點--><form action="#" method="get"> <!--文字框--> 帳號:<input type="text" placeholder="請輸入帳號" name="username" disabled/> 密碼:<input type="password" maxlength="6" name="userPassword" autofocus/> <!--按鈕 不會發起提交--> <input type="button" value="點擊我1"/> <input type="submit"/> <button>點擊我可以提交</button> <!--多選--> 籃球 <input type="checkbox" class="cb1"/> 足球 <input type="checkbox" class="cb1"/> 乒乓球 <input type="checkbox" class="cb1"/> 網球 <input type="checkbox" class="cb1"/> 同意 <input type="checkbox" checked="checked"/> 拒絕 <input type="checkbox"/> <!--單選 name值自訂--> 男 <input type="radio" name="sex"/> 女 <input type="radio" name="sex"/> <!--重設--> <input type="reset"/> <!--下拉框 下拉式清單--> <select name="" id="" class=""> <option value="bj">北京</option> <option value="dj">東京</option> <option value="nj">南京</option> <option value="xj">西京</option> </select> <!--多行文字框--> <textarea name="" id="" cols="30" rows="10"></textarea> <!--數字--> <input type="number" min="0" max="10"/> <input type="email"/> <input type="color"/> <label for="man">男</label> <input type="radio" name="sex" id="man"/> <label for="woman"> 女</label> <input type="radio" name="sex" id="woman"/></form></body></html>
HTML-form表單