:checked
在 JavaScript 中使用选择器时document.querySelectorAll()
,我发现存在不一致的行为。When the :checked
selector is used for checkbox or radio button it doesn't require space before the colon (:), but when this used for select options it requires a space before it. 为什么会这样?
以下是示例:-
复选框: http: //jsbin.com/fehonoho/1/edit ?html,js,console