<div id="testSlider">   <div class="esriTimeSlider ies-Slider" id="temp1467096958883">
<table width="100%" cellspacing="0" cellpadding="0" border="0">
<tbody><tr>
<td align="right" valign="middle"><span class="dijit dijitReset dijitInline dijitButton" role="presentation" widgetid="temp1467096958883_playpauseButtonNodeID" style="margin-top: -20px; display: block;"><span class="dijitReset dijitInline dijitButtonNode" data-dojo-attach-event="ondijitclick:__onClick" role="presentation"><span class="dijitReset dijitStretch dijitButtonContents" data-dojo-attach-point="titleNode,focusNode" role="button" aria-labelledby="temp1467096958883_playpauseButtonNodeID_label" title="Play/Pause" tabindex="0" id="temp1467096958883_playpauseButtonNodeID" style="-webkit-user-select: none;"><span class="dijitReset dijitInline dijitIcon tsButton tsPlayButton" data-dojo-attach-point="iconNode"></span><span class="dijitReset dijitToggleButtonIconChar">●</span><span class="dijitReset dijitInline dijitButtonText dijitDisplayNone" id="temp1467096958883_playpauseButtonNodeID_label" data-dojo-attach-point="containerNode">Play/Pause</span></span></span><input type="button" value="" class="dijitOffScreen" data-dojo-attach-event="onclick:_onClick" tabindex="-1" role="presentation" aria-hidden="true" data-dojo-attach-point="valueNode"></span></td>
<td align="center" valign="middle" width="80%" class="tsTmp"><table class="dijit dijitReset dijitSliderH dijitSlider" cellspacing="0" cellpadding="0" border="0" rules="none" data-dojo-attach-event="onkeydown:_onKeyDown, onkeyup:_onKeyUp" role="presentation" id="dijit_form_HorizontalSlider_0" widgetid="dijit_form_HorizontalSlider_0"><tbody><tr class="dijitReset"><td class="dijitReset" colspan="2"></td><td data-dojo-attach-point="topDecoration" class="dijitReset dijitSliderDecoration dijitSliderDecorationT dijitSliderDecorationH"><div class="dijitRuleContainer dijitRuleContainerH dijitRuleLabelsContainer dijitRuleLabelsContainerH" id="dijit_form_HorizontalRuleLabels_0" widgetid="dijit_form_HorizontalRuleLabels_0" style="height: 1em; font-size: 75%; color: gray; white-space: nowrap;"><div class="dijitRuleLabelContainer dijitRuleLabelContainerH" style="left:0%;"><div class="dijitRuleLabel dijitRuleLabelH">8时</div></div><div class="dijitRuleLabelContainer dijitRuleLabelContainerH" style="left:20%;"><div class="dijitRuleLabel dijitRuleLabelH">20时</div></div><div class="dijitRuleLabelContainer dijitRuleLabelContainerH" style="left:40%;"><div class="dijitRuleLabel dijitRuleLabelH">8时</div></div><div class="dijitRuleLabelContainer dijitRuleLabelContainerH" style="left:60%;"><div class="dijitRuleLabel dijitRuleLabelH">20时</div></div><div class="dijitRuleLabelContainer dijitRuleLabelContainerH" style="left:80%;"><div class="dijitRuleLabel dijitRuleLabelH">8时</div></div><div class="dijitRuleLabelContainer dijitRuleLabelContainerH" style="left:100%;"><div class="dijitRuleLabel dijitRuleLabelH">20时</div></div></div><div class="dijitRuleContainer dijitRuleContainerH" id="dijit_form_HorizontalRule_0" widgetid="dijit_form_HorizontalRule_0" style="height: 1em; font-size: 75%; color: gray;"><div class="dijitRuleMark dijitRuleMarkH" style="left:0%;"></div><div class="dijitRuleMark dijitRuleMarkH" style="left:20%;"></div><div class="dijitRuleMark dijitRuleMarkH" style="left:40%;"></div><div class="dijitRuleMark dijitRuleMarkH" style="left:60%;"></div><div class="dijitRuleMark dijitRuleMarkH" style="left:80%;"></div><div class="dijitRuleMark dijitRuleMarkH" style="left:100%;"></div></div></td><td class="dijitReset" colspan="2"></td></tr><tr class="dijitReset"><td class="dijitReset dijitSliderButtonContainer dijitSliderButtonContainerH"><div class="dijitSliderDecrementIconH" style="display:none" data-dojo-attach-point="decrementButton"><span class="dijitSliderButtonInner">-</span></div></td><td class="dijitReset"><div class="dijitSliderBar dijitSliderBumper dijitSliderBumperH dijitSliderLeftBumper" data-dojo-attach-event="press:_onClkDecBumper"></div></td><td class="dijitReset"><input data-dojo-attach-point="valueNode" type="hidden" name="temp1467096958883" value="0"><div class="dijitReset dijitSliderBarContainerH" role="presentation" data-dojo-attach-point="sliderBarContainer"><div role="presentation" data-dojo-attach-point="progressBar" class="dijitSliderBar dijitSliderBarH dijitSliderProgressBar dijitSliderProgressBarH" data-dojo-attach-event="press:_onBarClick" style="width: 0%;"><div class="dijitSliderMoveable dijitSliderMoveableH"><div data-dojo-attach-point="sliderHandle,focusNode" class="dijitSliderImageHandle dijitSliderImageHandleH" data-dojo-attach-event="press:_onHandleClick" role="slider" aria-valuemin="0" aria-valuemax="5" tabindex="0" aria-valuenow="0"></div></div></div><div role="presentation" data-dojo-attach-point="remainingBar" class="dijitSliderBar dijitSliderBarH dijitSliderRemainingBar dijitSliderRemainingBarH" data-dojo-attach-event="press:_onBarClick" style="width: 100%;"></div></div></td><td class="dijitReset"><div class="dijitSliderBar dijitSliderBumper dijitSliderBumperH dijitSliderRightBumper" data-dojo-attach-event="press:_onClkIncBumper"></div></td><td class="dijitReset dijitSliderButtonContainer dijitSliderButtonContainerH"><div class="dijitSliderIncrementIconH" style="display:none" data-dojo-attach-point="incrementButton"><span class="dijitSliderButtonInner">+</span></div></td></tr><tr class="dijitReset"><td class="dijitReset" colspan="2"></td><td data-dojo-attach-point="containerNode,bottomDecoration" class="dijitReset dijitSliderDecoration dijitSliderDecorationB dijitSliderDecorationH"><div class="dijitRuleContainer dijitRuleContainerH" id="dijit_form_HorizontalRule_1" widgetid="dijit_form_HorizontalRule_1" style="height: 1em; font-size: 75%; color: gray;"><div class="dijitRuleMark dijitRuleMarkH" style="left:0%;"></div><div class="dijitRuleMark dijitRuleMarkH" style="left:20%;"></div><div class="dijitRuleMark dijitRuleMarkH" style="left:40%;"></div><div class="dijitRuleMark dijitRuleMarkH" style="left:60%;"></div><div class="dijitRuleMark dijitRuleMarkH" style="left:80%;"></div><div class="dijitRuleMark dijitRuleMarkH" style="left:100%;"></div></div><div class="dijitRuleContainer dijitRuleContainerH dijitRuleLabelsContainer dijitRuleLabelsContainerH" id="dijit_form_HorizontalRuleLabels_1" widgetid="dijit_form_HorizontalRuleLabels_1" style="height: 2em; font-size: 75%; color: gray; white-space: nowrap;"><div class="dijitRuleLabelContainer dijitRuleLabelContainerH" style="left:0%;"><div class="dijitRuleLabel dijitRuleLabelH">1</div></div><div class="dijitRuleLabelContainer dijitRuleLabelContainerH" style="left:20%;"><div class="dijitRuleLabel dijitRuleLabelH">2</div></div><div class="dijitRuleLabelContainer dijitRuleLabelContainerH" style="left:40%;"><div class="dijitRuleLabel dijitRuleLabelH">3</div></div><div class="dijitRuleLabelContainer dijitRuleLabelContainerH" style="left:60%;"><div class="dijitRuleLabel dijitRuleLabelH">4</div></div><div class="dijitRuleLabelContainer dijitRuleLabelContainerH" style="left:80%;"><div class="dijitRuleLabel dijitRuleLabelH">5</div></div><div class="dijitRuleLabelContainer dijitRuleLabelContainerH" style="left:100%;"><div class="dijitRuleLabel dijitRuleLabelH">6</div></div></div></td><td class="dijitReset" colspan="2"></td></tr></tbody></table></td>
<td align="left" valign="middle" width="30"><span class="dijit dijitReset dijitInline dijitButton" role="presentation" widgetid="temp1467096958883_preButtonNodeID" style="margin-top: -20px; display: block;"><span class="dijitReset dijitInline dijitButtonNode" data-dojo-attach-event="ondijitclick:__onClick" role="presentation"><span class="dijitReset dijitStretch dijitButtonContents" data-dojo-attach-point="titleNode,focusNode" role="button" aria-labelledby="temp1467096958883_preButtonNodeID_label" title="Previous" tabindex="0" id="temp1467096958883_preButtonNodeID" style="-webkit-user-select: none;"><span class="dijitReset dijitInline dijitIcon tsButton tsPrevButton" data-dojo-attach-point="iconNode"></span><span class="dijitReset dijitToggleButtonIconChar">●</span><span class="dijitReset dijitInline dijitButtonText dijitDisplayNone" id="temp1467096958883_preButtonNodeID_label" data-dojo-attach-point="containerNode">Previous</span></span></span><input type="button" value="" class="dijitOffScreen" data-dojo-attach-event="onclick:_onClick" tabindex="-1" role="presentation" aria-hidden="true" data-dojo-attach-point="valueNode"></span></td>
<td align="left" valign="middle"><span class="dijit dijitReset dijitInline dijitButton" role="presentation" widgetid="temp1467096958883_nextButtonNodeID" style="margin-top: -20px; display: block;"><span class="dijitReset dijitInline dijitButtonNode" data-dojo-attach-event="ondijitclick:__onClick" role="presentation"><span class="dijitReset dijitStretch dijitButtonContents" data-dojo-attach-point="titleNode,focusNode" role="button" aria-labelledby="temp1467096958883_nextButtonNodeID_label" title="Next" tabindex="0" id="temp1467096958883_nextButtonNodeID" style="-webkit-user-select: none;"><span class="dijitReset dijitInline dijitIcon tsButton tsNextButton" data-dojo-attach-point="iconNode"></span><span class="dijitReset dijitToggleButtonIconChar">●</span><span class="dijitReset dijitInline dijitButtonText dijitDisplayNone" id="temp1467096958883_nextButtonNodeID_label" data-dojo-attach-point="containerNode">Next</span></span></span><input type="button" value="" class="dijitOffScreen" data-dojo-attach-event="onclick:_onClick" tabindex="-1" role="presentation" aria-hidden="true" data-dojo-attach-point="valueNode"></span></td>
</tr>
</tbody></table>
</div></div>

为了修改timeslider下方的label值,我需要获取相应的标签才可以。

首先我做了这样的尝试:

$(".tsTmp table> tbody tr")[2];获取到了下方整个lebel但并不是我想要的。

<tr class="dijitReset"><td class="dijitReset" colspan="2"></td><td data-dojo-attach-point="containerNode,bottomDecoration" class="dijitReset dijitSliderDecoration dijitSliderDecorationB dijitSliderDecorationH"><div class="dijitRuleContainer dijitRuleContainerH" id="dijit_form_HorizontalRule_1" widgetid="dijit_form_HorizontalRule_1" style="height: 1em; font-size: 75%; color: gray;"><div class="dijitRuleMark dijitRuleMarkH" style="left:0%;"></div><div class="dijitRuleMark dijitRuleMarkH" style="left:20%;"></div><div class="dijitRuleMark dijitRuleMarkH" style="left:40%;"></div><div class="dijitRuleMark dijitRuleMarkH" style="left:60%;"></div><div class="dijitRuleMark dijitRuleMarkH" style="left:80%;"></div><div class="dijitRuleMark dijitRuleMarkH" style="left:100%;"></div></div><div class="dijitRuleContainer dijitRuleContainerH dijitRuleLabelsContainer dijitRuleLabelsContainerH" id="dijit_form_HorizontalRuleLabels_1" widgetid="dijit_form_HorizontalRuleLabels_1" style="height: 2em; font-size: 75%; color: gray; white-space: nowrap;"><div class="dijitRuleLabelContainer dijitRuleLabelContainerH" style="left:0%;"><div class="dijitRuleLabel dijitRuleLabelH">1</div></div><div class="dijitRuleLabelContainer dijitRuleLabelContainerH" style="left:20%;"><div class="dijitRuleLabel dijitRuleLabelH">20%</div></div><div class="dijitRuleLabelContainer dijitRuleLabelContainerH" style="left:40%;"><div class="dijitRuleLabel dijitRuleLabelH">40%</div></div><div class="dijitRuleLabelContainer dijitRuleLabelContainerH" style="left:60%;"><div class="dijitRuleLabel dijitRuleLabelH">60%</div></div><div class="dijitRuleLabelContainer dijitRuleLabelContainerH" style="left:80%;"><div class="dijitRuleLabel dijitRuleLabelH">80%</div></div><div class="dijitRuleLabelContainer dijitRuleLabelContainerH" style="left:100%;"><div class="dijitRuleLabel dijitRuleLabelH">100%</div></div></div></td><td class="dijitReset" colspan="2"></td></tr>

我又做了这样的尝试:

$(".tsTmp table> tbody tr:eq(2) td:eq(1)");

<td data-dojo-attach-point="containerNode,bottomDecoration" class="dijitReset dijitSliderDecoration dijitSliderDecorationB dijitSliderDecorationH"><div class="dijitRuleContainer dijitRuleContainerH" id="dijit_form_HorizontalRule_1" widgetid="dijit_form_HorizontalRule_1" style="height: 1em; font-size: 75%; color: gray;"><div class="dijitRuleMark dijitRuleMarkH" style="left:0%;"></div><div class="dijitRuleMark dijitRuleMarkH" style="left:20%;"></div><div class="dijitRuleMark dijitRuleMarkH" style="left:40%;"></div><div class="dijitRuleMark dijitRuleMarkH" style="left:60%;"></div><div class="dijitRuleMark dijitRuleMarkH" style="left:80%;"></div><div class="dijitRuleMark dijitRuleMarkH" style="left:100%;"></div></div><div class="dijitRuleContainer dijitRuleContainerH dijitRuleLabelsContainer dijitRuleLabelsContainerH" id="dijit_form_HorizontalRuleLabels_1" widgetid="dijit_form_HorizontalRuleLabels_1" style="height: 2em; font-size: 75%; color: gray; white-space: nowrap;"><div class="dijitRuleLabelContainer dijitRuleLabelContainerH" style="left:0%;"><div class="dijitRuleLabel dijitRuleLabelH">1</div></div><div class="dijitRuleLabelContainer dijitRuleLabelContainerH" style="left:20%;"><div class="dijitRuleLabel dijitRuleLabelH">20%</div></div><div class="dijitRuleLabelContainer dijitRuleLabelContainerH" style="left:40%;"><div class="dijitRuleLabel dijitRuleLabelH">40%</div></div><div class="dijitRuleLabelContainer dijitRuleLabelContainerH" style="left:60%;"><div class="dijitRuleLabel dijitRuleLabelH">60%</div></div><div class="dijitRuleLabelContainer dijitRuleLabelContainerH" style="left:80%;"><div class="dijitRuleLabel dijitRuleLabelH">80%</div></div><div class="dijitRuleLabelContainer dijitRuleLabelContainerH" style="left:100%;"><div class="dijitRuleLabel dijitRuleLabelH">100%</div></div></div></td>

还不够深入,还需要获取更深的标签才行。

$(".tsTmp table> tbody tr:eq(2) td:eq(1) div:eq(9)");

<div class="dijitRuleLabel dijitRuleLabelH">0%</div>

至此才获取到了相应的值,那么就可以根据需要修改值了。只要改变index就OK。

$(".tsTmp table> tbody tr:eq(2) td:eq(1) div:eq(index)");

jquery 获取tbody下的第二个tr 及多级标签的更多相关文章

  1. js&jquery 获取select下拉框的值、文本内容、自定义属性

      js&jquery 获取select下拉框的值.文本内容.自定义属性 CreationTime--2018年7月2日09点22分 Author:Marydon html <selec ...

  2. jquery获取ul下的所有li个数

    通过jquery获取ul下所有li的个数(eg) $("ul li").length 通过jquery设置标签css的样式(eg)$("#div").css({ ...

  3. Jquery学习笔记:利用jquery获取select下拉框的值

    jquery不是特别熟练,每次使用不常用的就要百度,特地记录下来. 我的下拉框是: <div class="form-group"> <select class= ...

  4. 如何用jquery获取页面下HiddenField的值··

    怎么用jquery获取页面上HiddenField的值·· 怎么用jquery获取页面上HiddenField的值··?HiddenField的值是从后台赋值的··· 先赋值给Hiddenfield ...

  5. jquery获取select下拉框的前一个,后一个,第一个,最后一个option对象

    $("select option:selected").next(); <select> <option value="1" selected ...

  6. 通过一个name获取tbody下的其他name的值

    <tbody id="add_enterGoods_table">  <tr> <td align="center">< ...

  7. jquery 获取form下的所有元素

    <!DOCTYPE html> <html> <head> <meta charset="gb2312"> <title> ...

  8. jquery获取哪一个下拉框被选中

    var val = $("select[name='type_irb'] option:selected").val();

  9. jquery 对table的一些操作 怎么获取tr下的第二个td元素?

    1.HTML结构 <table id = "test"> <tr><td>1</td><td>1</td>& ...

随机推荐

  1. [Xcode 实际操作]一、博主领进门-(6)Xcode的iOS模拟器的基本使用方法

    目录:[Swift]Xcode实际操作 本文将演示Xcode的iOS模拟器的基本使用方法. 在项目导航区,鼠标右键[Assets.xcassets]资源文件夹. 隔壁右侧区域左下角点击[+],打开资源 ...

  2. JDK 重要目录结构

    \bin 目录包含 Java 的开发工具,包括 Java 编译器 javac.exe.Java 解释器 java.exe 等: javac:Java 编译器,用来将 Java 程序编译成字节码 jav ...

  3. LVS 负载均衡器总结

    下面部分原理部分,是从网上摘录,源网址已经无从获取,我将其中一小部分模糊的说明加入了一些自己的理解,仅最大可能让全文容易阅读,也方便自己以后参考,若你是大牛希望能给我一些宝贵的建议,将理解有误的地方加 ...

  4. 结合 webpack 使用 vue-router(七)

    结合 webpack 使用 vue-router: 首先安装路由包vue-router: cnpm install vue-router 使用模块化工具导入 vue-router 后,必须手动调用 V ...

  5. .Net Core应用框架Util介绍(二) 转

    Util的开源地址 https://github.com/dotnetcore/util Util的开源协议 Util以MIT协议开源,这是目前最宽松的开源协议,你不仅可以用于商业项目,还能把Util ...

  6. [題解]luogu_P1120小木棍(搜索)

    好久以前抄的題解,現在重新抄題解做一下 1.對所有木棍從大到小排序,後用小的比較靈活 2.限制加入的木棍單調遞減,因為先/后用長/短木棍等價,反正就是那兩根 3.預處理出重複木棍的位置,防止重複搜索相 ...

  7. djangoXadmin

    是一个基于admin二次开发的开源组件,但是貌似已经停止开发了. 安装方式:(py3.6,django2.1) 1 先用pip安装xadmin2,它会安装xadmin和一些依赖包 2 用pip卸载xa ...

  8. Ajax 提交表单【包括文件上传】

    利用js插件实现 <script src="@Url.Content("~/js/layer/jquery.form.min.js")"></ ...

  9. 【数据库-Azure SQL Database】JDBC 如何连接 SQL Azure 数据库

    使用 JAVA 代码连接 Azure SQL Database 时产生了 SSL 错误,对于此问题大多数用户都是因为不知如何编写 JDBC 连接字符串而产生的,以下为相关示例代码,供您参考:   pa ...

  10. 关闭windows7/8的自动升级到windows10

    办公室的电脑已经有好几台自动升级到windows10了. 由于用着很不习惯都要求改回windows7. 升级了就不支持退回去,只能是全部删除重新安装了,很是麻烦.但是也没有看到哪里有可以关闭自动升级的 ...