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 -

reflection - How to access the object-members of an object declaration in kotlin -

php - Doctrine Query Builder Error on Join: [Syntax Error] line 0, col 87: Error: Expected Literal, got 'JOIN' -