Right now i am getting elements from form using getelementTagname in two differenet variables.But now i want to join them so that i can access them in a single variable.concat and join are not working , any suggestions ?
My code :-
var inputsi = frm.getElementsByTagName("input");
var inputst = frm.getElementsByTagName("textarea");
now i want to get them in a single variable by joining .
getElementsByTagNamereturns a host object. Though the elements in that object can be accessed like an array, it is not an actual array. so concat and append won’t work.use jQuery for getting elements:
or use
forloop to copy all elements from both variables into a new array.