设置 | 登录 | 注册

作者共发了3篇帖子。

【资料】HTML5复选框的“部分选中”(indeterminate)属性

1楼 巨大八爪鱼 2015-11-22 17:44
Firefox浏览器下的效果:


代码:
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Untitled Document</title>
<script>
function onload() {
    document.getElementById('test3').indeterminate = true;
}
</script>
<style type="text/css">
body,td,th {
    font-family: Arial;
    font-size: 13px;
}
</style>
</head>

<body onLoad="onload()">
<form>
  <input type="checkbox" checked><br>
  <input type="checkbox" indeterminate id="test"><label for="test">只写一个indeterminate不起作用</label><br>
  <input type="checkbox" id="test2"><br>
  <input type="checkbox" id="test3" /><label for="test3">Checkbox</label><br>
</form>
</body>
</html>

2楼 巨大八爪鱼 2015-11-22 17:45
3楼 巨大八爪鱼 2015-11-22 17:46
IE11浏览器下的效果:

内容转换:

回复帖子
内容:
用户名: 您目前是匿名发表。
验证码:
看不清?换一张
©2010-2025 Purasbar Ver3.0 [手机版] [桌面版]
除非另有声明,本站采用知识共享署名-相同方式共享 3.0 Unported许可协议进行许可。