jquery - How to get input value with no id using JavaScript? -
i have editable datatabe , when edit mode, generated html shown below:
<td><form><input autocomplete="off" name="value" ></form></td>
there s textbox input , need t value of input. however, cannot give id there no configuration of datatable , decided value using javaascipt. have tried many different methods closest() shown below, cannot value. possible grab it?
var $row = $(this).closest("tr"); $tds = $row.find("td");
you might use document.queryselector
:
var input = document.queryselector('[name="value"]`);
or, using jquery, use same selector:
var input = $('[name="value"]');
Comments
Post a Comment