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.")     } } 

demo


Comments

Popular posts from this blog

java - activate/deactivate sonar maven plugin by profile? -

python - TypeError: can only concatenate tuple (not "float") to tuple -

java - What is the difference between String. and String.this. ? -