CheckBox 半选中状态

<input type='checkbox' />可以半选中,这个特性,很多浏览器都支持,包括Firefox,Chrome和IE

用 input.indeterminate 这个属性来获取或者设置半选中状态。

input.indeterminate = true; //设置成半选中

if(input.indeterminate) //用这个属性来判断是否半选中

选中和半选中input.checked都是true

原文地址:https://www.cnblogs.com/easyc/p/6027077.html