,因为我是新来的jQuery我想问下面,我有一个这样的表:获取取决于x和y一表的单元格的值坐标
<table id="lettersGrid" border="1">
<tr>
<td>..</td>
<td>..</td>
<td>..</td>
</tr>
<tr>
<td>..</td>
<td>..</td>
<td>..</td>
</tr>
</table>
我想使用jQuery以获取特定单元格的值取决于它的x和y位置,所以我有
$("td").mouseover(function(){
x=this.parentNode.rowIndex; //get the x coordinate of the cell
y=this.cellIndex; //get the y coordinate of the cell
//??whats next??
});
任何帮助吗?
开始你并不需要他们如果你想要的只是获得值 - 只需使用鼠标悬停事件中已有的“this”引用 – BonyT