How should disabled
act?

前端 未结 2 548
耶瑟儿~
耶瑟儿~ 2020-12-20 16:35

I noticed the following bug when using $(selector).children().attr(\"disabled\", \"disabled\") where the children happened to contain a

相关标签:
2条回答
  • 2020-12-20 17:10

    There is no disabled attribute for the div element. So it should have no effect.

    0 讨论(0)
  • 2020-12-20 17:35

    <div> elements do not have a disabled attribute according to the HTML specification. The expected behavior is to prevent your markup from validating correctly.

    However, the new HTML5 specification allows for <fieldset> to have a disabled attribute, which disables any nested input fields. It's not widely supported yet though, so you won't be able to rely on this feature for a while.

    0 讨论(0)
提交回复
热议问题