我有一个简单的功能,看起来像这样jQuery的解析HTML
var getCellText = function ($cell) {
var html = $cell.html();
$(html).find("input").each(function() {
alert(this.value);
});
}
的HTML可能看起来像这样
<input class="lineno" name="lineno" value="4109375" type="hidden">
<input onchange="Time.UpdateLine(this, 'studentno', this.value, '4109375');" class="studentno" value="2088" type="text">
我需要得到studentno输入变量的值(我可以忽略名为lineno的输入)。
我怎么能做到这一点,你可以看到,我已经给了它一个尝试
+1使用.find () –
感谢您的帮助 – The87Boy