V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
ddyy
V2EX  ›  分享发现

html 的 checkbox 有部分选择状态?

  •  
  •   ddyy · 2014-05-13 16:18:25 +08:00 · 2705 次点击
    这是一个创建于 3628 天前的主题,其中的信息可能已经有所发展或是发生改变。
    刚在phpmyadmin看到的,震惊了
    7 条回复    2014-05-13 17:37:38 +08:00
    lingyired
        1
    lingyired  
       2014-05-13 16:31:08 +08:00
    js + icon
    sneezry
        2
    sneezry  
       2014-05-13 16:33:17 +08:00   ❤️ 1
    有,checkbox的indeterminate属性
    rannnn
        3
    rannnn  
       2014-05-13 16:34:12 +08:00 via iPhone   ❤️ 2
    @lingyired checkbox.indeterminate = true
    ddyy
        5
    ddyy  
    OP
       2014-05-13 16:41:11 +08:00
    今天彻底震惊了,接触html满打满算11年了,今天刚发现这个特性
    lingyired
        6
    lingyired  
       2014-05-13 17:30:02 +08:00
    @rannnn thanks
    chemzqm
        7
    chemzqm  
       2014-05-13 17:37:38 +08:00   ❤️ 1
    The :indeterminate CSS pseudo-class represents any <input type="checkbox"> element whose indeterminate DOM property is set to true by JavaScript. In addition, in some browsers, it can be used to match to <progress> elements in an indeterminate state

    ie要10才支持,不过不支持也没啥影响
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   3384 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 00:39 · PVG 08:39 · LAX 17:39 · JFK 20:39
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.