I am using getElementsByClassName to get a collection of tr.
I want to now iterate through the collection and get the value of a textbox in the tr.
I cannot use JQuery to do this or any other framework.
How can this be done?
var dom = document.getElementsByClassName('Row');
var arr = [];
var len = dom.length;
for (var i = 0; i < len; i++) {
// foo = look up value of a text box in this row
// bar = look up value of a text box in this row
var obj = {
quantity: foo,
price: bar
};
arr.push(obj);
}
getElementsByClassNamebut put it in to simplify the example. I am using aYUImethod that returns exactly the same thing @MackieeE @mu is too short