Getting id from element with forEach loop
I am using a foreach loop to loop through an array of a grid datasource view and don't know how to get the Id of an element from a column. The element is a div and an input and I don't know how to get the id from the input. The element.Option being returned is <div class="checkbox" style="margin:0"> <input id="428" checked="" type="checkbox" data-size="mini" data-on="Yes" data-off="No"> </div> and I am looping through the ds ds.forEach(function (element) { // How can I get the id of the input let me = document.getElementById(element.Option.id).checked; ... }); EDIT Here is exactly what each el
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.