如何在jQuery thisRow.getElementsByTagName(';input';)中写入[0]

如何在jQuery thisRow.getElementsByTagName(';input';)中写入[0],jquery,Jquery,如何在jQuery thisRow.getElementsByTagName(“输入”)中写入[0] 试试下面的方法 $('input',thisRow)[0] 您可以尝试以下代码: $(thisRow).find('input')[0]$(thisRow).find('input').first()[0].typeahead({})?window.getproduct=function(thisRow){var one=thisRow.getElementsByTagName('input

如何在jQuery thisRow.getElementsByTagName(“输入”)中写入[0]


试试下面的方法

$('input',thisRow)[0]

您可以尝试以下代码:

$(thisRow).find('input')[0]
$(thisRow).find('input').first()[0].typeahead({})?window.getproduct=function(thisRow){var one=thisRow.getElementsByTagName('input')[0]。值;警报(一);$.get('/api/product/product/productjson?搜索='+one,函数(数据){('input',',thisRow)[0]。typeahead({source:data,autoSelect:true,displayText:function(item){return item.name;},afterSelect:function(item){\$thisRow.getElementsByTagName('input')[1]。value=item.id;alert(item.product_name);},},'json');}不工作------window getproduct=function(thisRow){var one=thisRow.getElementsByTagName('input')[0].value;//alert(one);$.get('/api/product/productjson?search='+one,函数(数据){$('input',thisRow)[0].typeahead({source:data,autoSelect:true,displayText:function(item){return item.name;},afterSelect:function(item){\$thisRow.getElementsByTagName('input')[1]。值=item.id;警报(item.product_name);},},},},'json');}
thisRow.getElementsByTagName('input')[0].typeahead({});
$('input',thisRow)[0]