<script>
$('#btntb').click(function () {
$('#tab tr').each(function (i) { // 遍历 tr
$(this).children('td').eq(1).addClass('content');
//$(this).children('td').each(function (j) { // 遍历 tr 的各个 td
// // console.log($(this).text()); //});
});
}); //$(function () {
// $("#btn").click(function () {
// $("#test tr td:nth-child(2)").addClass('red');
// });
// $("#test tr").click(function () {
// $(this).children('td').eq(1).addClass('red');
// });
//});
window.onload = function () { }
</script>
$(this).children('td').eq(1).css({ "text-align" :"left" });

jq遍历table 下的 td 添加类的更多相关文章

  1. jQuery遍历table中间tr td并获得td价值

    jQuery遍历table中间tr td并获得td中间值 $(function(){ $("#tableId tr").find("td").each(func ...

  2. 关于jq操作table下多个type=radio的input的选中

    假如有2个table: <table id="table1" border="0"> <tr> <td><input ...

  3. jquery 遍历 table 下所有得tr td

    $("#middle").contents().find("tbody tr").each(function(i,n){ var child = $(this) ...

  4. jq遍历table表demo

    <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...

  5. jquery遍历table中每个td的值

    废话不说直接上: <table style="border:1px solid #ccc">        <tr>            <td&g ...

  6. Jquery 遍历 Table;遍历CheckBox ;遍历Select;全选/全不选

    关于Jquery:相信大家已经很熟悉了,我最近的项目运用到关于Jquery的遍历事件:权当总结下: 遍历Table <table  id="thistab"> < ...

  7. js动态添加table 数据tr td

    成果库修改:      要求主题列表随成果类型改变而改变      网上查询资料后开工,在成果类型下拉框添加change()事件触发Dwr,查询主题集合——动态创建/编辑Table      概要代码 ...

  8. Java精选笔记_IO流【File(文件)类、遍历目录下的文件、删除文件及目录】

    File(文件)类 File类用于封装一个路径,该路径可以是从系统盘符开始的绝对路径,也可以是相对于当前目录而言的相对路径 File类内部封装的路径可以指向一个文件,也可以指向一个目录,在使用File ...

  9. Azure Table storage 之改进DynamicTableEntity类为其添加动态语言扩展

    在之前的一篇文章中提到,storage类库中包含一个可以用来动态获取Azure table storage 表结构的类-DynamicTableEntity. 我们可以通过这个类,我们无需为每一个表提 ...

随机推荐

  1. Git学习总结(13)——使用git.oschina作为自己的源代码在线管理库

    工作有几年了,期间积累了很多的代码片段,一直想找个存放的地方,方便随时的取用.以前可能是放在自己电脑的硬盘中,但毕竟这样使用起来还是有很多不便. 下面通过码云来说明 一下设置过程.其实,码云和GitH ...

  2. RAID级别简介

    独立硬盘冗余阵列(RAID, Redundant Array of Independent Disks),旧称廉价磁盘冗余阵列(RAID, Redundant Array of Inexpensive ...

  3. Network Saboteur POJ 2531 回溯搜索

    Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 12886   Accepted: 6187 Description A un ...

  4. [poj3735] Training little cats_矩乘快速幂

    Training little cats poj-3735 题目大意:给你n个数,k个操作,将所有操作重复m次. 注释:三种操作,将第i个盒子+1,交换两个盒子中的个数,将一个盒子清空.$1\le m ...

  5. 关于Spring的xml文档的简单实用配置

    Spring的spring.xml文档的配置 最近在写Spring的配置文件时,发现Spring文档的配置其实没必要那么繁琐记忆,网上的很多文章都写得很繁琐,如果所有的东西按照路径去查找,可以很快的帮 ...

  6. volatile非原子性的示例

    volatile非原子性的示例 package com.stono.thread2.page124; public class MyThread extends Thread { volatile p ...

  7. jQuery Validate 使用

    jQuery Validate 使用 <script src="js/b/js/jquery.validate.js"></script> <styl ...

  8. JSONObject.toBean() data转换

    //toBean方法不识别date属性  要把VO的DATE该成UTIL包下的DATE 然后加上下面的代码.不然会报错JSONUtils.getMorpherRegistry().registerMo ...

  9. HDU 5536/ 2015长春区域 J.Chip Factory Trie

    Chip Factory Problem Description John is a manager of a CPU chip factory, the factory produces lots ...

  10. 【Ubuntu QQ】记如何在Ubuntu上安装QQ(附下载)

    什么困扰着一批批的ubuntu桌面用户?是麻花藤.哦不,是QQ,怎么在ubuntu上安装完美无瑕的QQ. 最佳解决方案在“三”部分,当然前两个也不失为解决方案 一.尝试的开始 配置: 双系统:Wind ...