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

angular - DownloadURL return null in below code -

python 2.7 - Given three nested dictionaries, sort the top two nested dictionaries from a value in the innermost dictionary? -