JS 获取鼠标所点击表格中的某行某列的值
来源:互联网 发布:淘宝追加评价有信誉吗 编辑:程序博客网 时间:2024/04/28 10:00
<!DOCTYPE html><html><head><script type="text/javascript" src="js/laydate-v1.1/laydate/laydate.js"></script><script type="text/javascript" src="js/jquery-1.11.3.min.js"></script><meta charset="utf-8" /><title>BINGO</title><style type="text/css">body,html {background: white;padding: 0px;margin: 0px;font-size: 45px;color: red;text-align: center;}th,td {width: 100px;}</style><script type="text/javascript">window.onload = function() {for (var i = 0; i < 24; i++) {document.getElementById("square" + i).innerHTML = Math.floor(Math.random() * 75) + 1;}document.onmousedown = function(e) { //点击获取表格中的值alert(e.target.innerHTML)}}</script></head><body><input id="hello" class="laydate-icon"><script>laydate.skin('molv');laydate({// istime: true,istoday: false,min: laydate.now(), //设定最小日期为当前日期elem: '#hello', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'event: 'focus' //响应事件。如果没有传入event,则按照默认的click});</script><table border="1px" id="table1"><tr><th>B</th><th>I</th><th>N</th><th>G</th><th>O</th></tr><tr><td id="square0"> </td><td id="square5"> </td><td id="square10"> </td><td id="square14"> </td><td id="square19"> </td></tr><tr><td id="square1"> </td><td id="square6"> </td><td id="square11"> </td><td id="square15"> </td><td id="square20"> </td></tr><tr><td id="square2"> </td><td id="square7"> </td><td id="free">Free</td><td id="square16"> </td><td id="square21"> </td></tr><tr><td id="square3"> </td><td id="square8"> </td><td id="square12"> </td><td id="square17"> </td><td id="square22"> </td></tr><tr><td id="square4"> </td><td id="square9"> </td><td id="square13"> </td><td id="square18"> </td><td id="square23"> </td></tr></table><p><a href="script01.html" id="reload">Click here</a> to create a new card</p></body></html>
0 0
- JS 获取鼠标所点击表格中的某行某列的值
- javascript 获取鼠标所点击的对象
- js获取所点击<a>的href值
- Swing制作表格鼠标获取所选行的代码
- js获取鼠标点击的位置
- js 获取鼠标点击坐标
- js获取鼠标点击位置
- js获取鼠标点击坐标
- js获取获取鼠标点击控件的属性
- 鼠标点击 获取td的值
- js获取鼠标点击的位置-火狐IE兼容
- js获取鼠标点击事件的相对位置
- js实现鼠标点击获取相对于整个页面的位置
- JS获取页面鼠标点击位置的坐标
- js获取页面元素和鼠标的点击位置
- js 获取url参数值,鼠标点击在页面的位置
- 【Unity 3D学习】获取鼠标点击所对应的GameObject
- 获取鼠标点击的位置
- 测试CSRF
- Centos下python安装 MySQLdb报错
- Android出现Immutable bitmap passed to Canvas constructor错误的原因
- IntentService源码分析
- 基于egret引擎、P2物理库的搭积木游戏
- JS 获取鼠标所点击表格中的某行某列的值
- 红黑树(四)之 C++的实现 http://www.cnblogs.com/skywang12345/p/3624291.html?utm_source=tuicool&utm_medium=refe
- java操作sql server数据中,关于PreparedStatement数据注入问题
- Menu菜单
- 枚举——POJ1753
- 好技术主管VS坏技术主管
- kali攻防第7章补充 SQLMAP介绍之Cookie注入
- word to tif
- 数据存储之SharedPreferences