I have the following code below, that is working for the most part. It returns the value in the textbox control. However, I also need the control’s “id” value (the textbox controls name). How can I obtain that?
When I do an “inputs[i].” I only get item and value options.
var brSettings = document.getElementById("divSettings");
var inputs = brSettings.getElementsByTagName("input");
var sum = 0
for (var i = 0; i < inputs.length; i++) {
sum += inputs[i].value;
}
You just need to access the id like so: