javascript - Accessing DOM elements inside a variable -
i have tr element have extracted variable in javascript. want further dig element extract specific content there. example there input of type=text inside td. want below.
var trelem = $("#idoftrelem").get();//this gives me array of content of tr element.
now want further dig above variable , extract values out of that. shall do?
is there reason why you're calling .get()
early? jquery makes extracting data pretty straightforward. example, find of inputs in row , log values this:
$('#idoftrelem input[type=text]').each(function() { console.log(this.value); });
i wrote post doing you're describing, should helpful: http://encosia.com/use-jquery-to-extract-data-from-html-lists-and-tables/
Comments
Post a Comment