javascript - onChange event---> only alert working?!! other functions not working -
<div class="col-md-2"><select id="ddluser" onchange="loadcheckboxesforuser()" class="form-control" style="width:100%;" > function loadcheckboxesforuser() { alert("hi"); $("#checkbox1").attr("checked", "checked"); }
only alert working, not make checkbox checked,
otherwise when use function on $(document).ready , works fine
you can use .prop
method check
checkbox
$("#checkbox1").prop("checked", "checked");
Comments
Post a Comment