var checkbox = document.querySelector("input[name=postcheckbox]");
checkbox.addEventListener('change', function() {
if (this.checked) {
console.log("Checkbox is checked..");
//pass to model
} else {
console.log("Checkbox is not checked..");
//pass to model
}
});
1条答案
按热度按时间lfapxunr1#
通过使用Js