- Javascript appendChild checkbox onclick not running
- var cb = document.createElement('input');
- cb.type = 'checkbox';
- cb.onclick = newfunction();
- cb.name = "done";
- cb.value = "done";
- theCell.appendChild(cb);
- cb.onclick = newfunction;
- cb.onclick = function(){
- newfunction("something");
- };
- cb.onclick = newfunction;//NO BRACKETS in this case
- cb.onclick = function() { newfunction(); }