获取鼠标hover表格的行列位置
来源:互联网 发布:google chrome翻墙mac 编辑:程序博客网 时间:2024/04/27 17:49
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><script type="text/javascript" src="jquery.js"></script><script type="text/javascript" language="javascript"> $(document).ready(function() { $("#MyTable").find("td").hover(function() { var hang = $(this).parent().prevAll().length + 1; var lie = $(this).prevAll().length + 1; $(":input").val("第" + hang + "行,第" + lie + "列"); }) }) </script><title>JQuery</title><style type="text/css">table{ background: #FFCC99;}td{ text-align: center; width: 100px; height: 30px;}</style></head><body> <table id="MyTable" border="1" cellpadding="2" cellspacing="0"> <tr> <td> (1,1) </td> <td> (1,2) </td> <td> (1,3) </td> </tr> <tr> <td> (2,1) </td> <td> (2,2) </td> <td> (2,3) </td> </tr> <tr> <td> (3,1) </td> <td> (3,2) </td> <td> (3,3) </td> </tr> </table> <br /> <input type="text" /></body></html>
0 0
- 获取鼠标hover表格的行列位置
- 获取鼠标的位置
- js获取鼠标的位置
- javascript获取鼠标的位置
- js 获取鼠标的位置
- js 获取鼠标的位置
- js 获取鼠标的位置
- 获取鼠标点击的位置
- winform 获取鼠标的位置
- javascript 获取鼠标的位置
- WPF获取鼠标的位置
- 获取鼠标的绝对位置
- X11获取鼠标的位置
- 获取鼠标单击的位置
- 获取表格的绝对位置
- 当hover结束之后获取鼠标上的节点
- js通过行列获取表格中input的值
- jquery 获取当前元素 表格所在的行列数
- How to debug in Perl ?
- (转载)linux命令之四十二iostat命令
- 百度地图开发小结(2)
- 移动统计数据
- eclipse_cpp 配置mingw
- 获取鼠标hover表格的行列位置
- Linux - FTP命令使用详解
- 10 第十天【健身】
- 【Android 很进阶】android OOM理解以及相关方法分析
- xcode6 新建Pch文件
- iOS中UIWindow妙用(一) App 的密码保护功能
- mondrian 生成图表 XY轴数据过多
- 东莞已摘黄帽 东莞为什么会被叫做性都?
- JDBC 3种获得mysql插入数据的自增字段值的方法