jquery - $("input:checkbox:not(:checked)") exact match of this in javascript -


i tried

var checkedboxes = document.queryselectorall('input[type=checkbox].checked'); 

its working , need unchecked checkbox values

$("input:checkbox:not(:checked)")  

like need in javascript please me

you can use css :not() method along :checked selector

document.queryselectorall('input[type=checkbox]:not(:checked)') 

console.log(document.queryselector('input[type=checkbox]:not(:checked)').value)
<input type="checkbox" value="1">

also, note using class selector when prefixing .


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -