Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/413.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/89.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 使用find搜索容器内部的jQuery将失去对jQuery的控制_Javascript_Jquery_Html - Fatal编程技术网

Javascript 使用find搜索容器内部的jQuery将失去对jQuery的控制

Javascript 使用find搜索容器内部的jQuery将失去对jQuery的控制,javascript,jquery,html,Javascript,Jquery,Html,我需要在特定行的表中的输入中查找信息 我有这个 var myElements = $('#myTable tbody').find('tr'); console.log(myElements); 这将正确显示表中的项目 [tr.rowcenter, tr.rowcenter, prevObject: e.fn.e.init[1], context: document, selector: "#myTable tbody tr", constructor: function, init: fun

我需要在特定行的
表中的
输入中查找信息

我有这个

var myElements = $('#myTable tbody').find('tr');
console.log(myElements);
这将正确显示表中的项目

[tr.rowcenter, tr.rowcenter, prevObject: e.fn.e.init[1], context: document, selector: "#myTable tbody tr", constructor: function, init: function…]
0: tr.rowcenter               <- OK
1: tr.rowcenter               <- OK
context: document
length: 2
prevObject: e.fn.e.init[1]
selector: "#tRangos tbody tr"
__proto__: e[0]
我明白了

未捕获的TypeError:myElements[i]。查找不是函数

console.log(myElements[i])
仅查看HTML元素时

<tr class="rowcenter">
    <td>
        <input class="r_min" value="10.0">
    </td>
    <td>
        <input class="r_max" value="12.0">
    </td>
    <td>
        <input class="r_val" value="50.00">
    </td>
    <td> other trash</td>
</tr>

其他垃圾
为什么?


注:我使用jQuery 1.7.2

使用
myElements.eq(I)
而不是
myElements[I]
。这将过滤掉除第i行以外的所有内容。

myElements.eq(i).find(“.r_min”).val()
myElements[i]
是一个DOM节点,而不是一个jq对象。get(i)
myElements[i]
类似,后者给出了DOM节点和
myElements.eq(i)
提供jQueryobject@jasilva现在将其标记为重复是否有意义?@jasilva,这两个函数是否与您的问题相关?我还向你解释了它们与你的问题的相关性。。无论如何,不要强迫。完美地跑!!花更多的时间写问题,然后得到正确的答案:)
<tr class="rowcenter">
    <td>
        <input class="r_min" value="10.0">
    </td>
    <td>
        <input class="r_max" value="12.0">
    </td>
    <td>
        <input class="r_val" value="50.00">
    </td>
    <td> other trash</td>
</tr>