使用JQUERY获取div标签中表的所有td标签 [英] Get all the td tags of table which in div tag using JQUERY

查看:748
本文介绍了使用JQUERY获取div标签中表的所有td标签的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个带有id的div标签,里面包含表格。我想在使用Jquery鼠标翻转和输出事件时更改td标记的背景颜色。使用jquery在div中选择tds的方法是什么?

I have a div tag with id which contains table inside. I want to change the background color of td tag while mouse over and out events using Jquery. What is the way of selecting the tds with in the div using jquery?

示例代码

<div id="Outer">
   <table>
     <tr><td>1</td><td>Rama</td><td>8088080980</td></tr>
     <tr><td>2</td><td>Krishna</td><td>454546</td></tr>
   </table>
</div>


推荐答案

全部 td div

$('#outer td')

这篇关于使用JQUERY获取div标签中表的所有td标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆