我試圖訪問使用this
的.each()
內的對象和要執行.find()
用,但在控制檯它說.find
是未定義功能。「this」不能在.each()中使用.find()?
data=$(data);
$("tr", data).each(function(){
var est = this.find(".estname a").html;
});
我也試過這樣:
data=$(data);
$("tr", data).each(function(){
var est = $(this).find(".estname a").html;
});
在控制檯它顯示function()
而不是任何對象:(
請閱讀文檔:http://api.jquery.com/html/ –
在提出問題之前,請務必閱讀文檔,否則這將表明您沒有對此進行任何研究。 –