a | aa | aaa | |||
b | bb | bbb |
当鼠标从tr中的任意文本框中移出时,弹出当前行里的第一个文本框中的值
谢谢了
[code="JavaScript"]$(document).ready(function(){
$("#t2 input").mouseout(function(){
var trNode = $(this).parent().parent(); //获取input的“爷爷”--tr
var forthChildTdNode = trNode.children().eq(3);//获取第四个td
var firstInput = forthChildTdNode.children(); //获取第一个input
alert("test"+firstInput.val()); //测试,OK
});
}); [/code]
$("#t2 input").mouseout(function(){
alert(....当前行第一个文本框的值);
});
$(this).find("td:first-child input").val()