html中怎么在单元格里做复选框?

html中怎么在单元格里做复选框?,第1张

使用checkbox属性,代码如下

<html>

<body>

<table border="1">

<tr>

<th><input type="checkbox" onclick="swapCheck()" /></th>

<th>Month</th>

<th>Savings</th>

</tr>

<tr>

<td><input type="checkbox" /></td>

<td>January</td>

<td>$100</td>

</tr>

<tr>

<td><input type="checkbox" /></td>

<td>February</td>

<td>$150</td>

</tr>

</table>

</body>

</html>

<html>

<body>

<table border="1">

<tr>

<td><input type="radio" value="单选框">单选框</td>

<td><input type="checkbox" value="复选框">复选框</td>

</tr>

<td><input type="text" value="文本框"></td>

<td>

<select>

<option>下拉框</option>

<option>1</option>

<option>2</option>

<option>3</option>

</select>

</td>

<tr>

</tr>

</table>

</body>

</html>


欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/zaji/7241695.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2023-04-03
下一篇2023-04-03

发表评论

登录后才能评论

评论列表(0条)

    保存