<!DOCTYPE html>
<html>
<head>
<script>
function check(){
listForm.sel.checked=true;
}</script></head><body><form name="listForm">
<input type="checkbox" name="sel"/></form><input type="button" value="button" onclick="check();"/>
<html>
<head>
<script>
function check(){
listForm.sel.checked=true;
}</script></head><body><form name="listForm">
<input type="checkbox" name="sel"/></form><input type="button" value="button" onclick="check();"/>
</body>
按下button键会使得form表单里的名为sel的checkbox被选中.
本文介绍了一个简单的HTML脚本,该脚本通过一个按钮来控制表单内复选框的状态。当点击按钮时,名为'sel'的复选框会被自动选中。
2292

被折叠的 条评论
为什么被折叠?



