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

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

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

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

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

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-11-22
  • 2021-12-25
  • 2021-12-20
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-12-02
  • 2021-11-06
  • 2022-03-03
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案