Get checkbox is checked or not using Javascript -
i've got problem can't solve. partly because can't explain right terms. i'm new sorry clumsy question.
below can see overview of goal.
i'm running code in magento
<input type="checkbox" style="margin-left:24px" class="mydelete" name="checkall" onclick='checkedall(testcheck);' />
added id attribute element.
<input type="checkbox" style="margin-left:24px" class="mydelete" name="checkall" id="checkall"onclick='checkedall();' />
javascript
function checkedall(){ if (document.getelementbyid('checkall').checked) { alert("checked"); } else { alert("you didn't check it! let me check you.") } }
Comments
Post a Comment