---
title: "indeterminate 多选框半选功能"
author: "arne3166"
date: "2011-03-17T12:05:17Z"
tags: []
categories: ["Web前端"]
slug: "indeterminate"
draft: false
lastmod: "2011-03-17T12:05:17Z"
id: 965206
url: "https://arne3166.iteye.com/blog/965206"
---

```
document.getElementById("total").indeterminate = true;
```

 对于多选框实现半选的功能。

 

多选框的功能：可以表示该项目是选中还是没有选中，但是为了表示父节点下某些子节点没有勾选，但某些节点已经被选中，因此使用indeterminate 表示半选。