jquery操作table中的tr,td的方法双击dblclick attr parent id原创

本文涉及的产品
转发路由器TR,750小时连接 100GB跨地域
简介:
<script src="${base}/common_res/js/jquery.js" type="text/javascript"></script>
<script type="Text/JavaScript">
$(document).ready(function(){
    $(".bbs tr td").dblclick(function() {
     alert("aa");
     alert($(this).html());
     alert($(this).attr('id'));
     alert($(this).parent('tr').attr('id'));     
    });
})
</script>
</HEAD>
<BODY>
<table class="bbs">
<tr id='5'><th id='name5'>88</th><th id='name51'>881</th></tr>
<tr id='0'><td id='name0'>5555双击试试</td></tr>
<tr id='1'><td id='name1'>6655双击试试</td></tr>
</table>
</BODY>
</HTML>
原创jquery操作table中的tr,td的方法双击dblclick attr parent id

jQuery 操作 table td attr



本文转自左正博客园博客,原文链接:http://www.cnblogs.com/soundcode/archive/2012/02/15/2352195.html,如需转载请自行联系原作者

目录
打赏
0
0
0
0
51
分享
相关文章
|
10月前
|
jQuery 遍历 方法
jQuery 遍历 方法
74 5
jQuery - AJAX load() 方法
jQuery load() 方法是简单但强大的 AJAX 方法。
157 6
jquery中html()方法的使用
jquery中html()方法的使用
161 1
|
10月前
|
jQuery parentsUntil() 方法
jQuery parentsUntil() 方法
66 10
jQuery - noConflict() 方法
jQuery - noConflict() 方法
58 5
|
10月前
|
jQuery parents() 方法
jQuery parents() 方法
92 7
|
10月前
|
jQuery 效果 方法
jQuery 效果 方法
39 3
jQuery 杂项方法
jQuery 杂项方法
76 2
jQuery HTML / CSS 方法
jQuery HTML / CSS 方法
66 2
jQuery AJAX 方法
jQuery AJAX 方法
86 1
AI助理

你好,我是AI助理

可以解答问题、推荐解决方案等