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>

<input type="checkbox" name="fruit" value="1"/>苹果

<input type="checkbox" name="fruit" value="2"/>橘子

<input type="checkbox" name="fruit" value="3"/>葡萄


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

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

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

发表评论

登录后才能评论

评论列表(0条)

    保存