zoukankan      html  css  js  c++  java
  • jQquery选取元素

    $("#id").parent(); 所有父级元素

    $("#id").children();所有子级元素

    $("#id").next();下一个兄弟节点

    $("#id").prev();上一个兄弟节点

    $("#id").children(":first");第一个子级元素

    $("#id").children(":last");最后一个子级元素

    $("#id").children().eq(0);第一个子级元素

    <td class="yPd">
       <input id="project_C05" class="combotree-f combo-f textbox-f" type="text" data-options="required:true " disabled="disabled" style="display: none;" textboxname="project.C05" comboname="project.C05">
       <span class="textbox textbox-disabled combo" style=" 258.4px; height: 20.4px;">
          <span class="textbox-addon textbox-addon-right" style="right: 0px;">
          <span id="historyC05" title="其他仓储业">
             <input class="textbox-text validatebox-text" type="text" autocomplete="off" disabled="disabled" readonly="readonly" placeholder="" style="margin-left: 0px; margin-right: 18px; padding-top: 0px; padding-bottom: 0px;  232.4px; background-color: yellow;">
          </span>
         <input class="textbox-value" type="hidden" name="project.C05" disabled="disabled" value="0111">
       </span>
    </td>

    $("#project_C05").next().children().eq(1).children(":first").css('backgroundColor','yellow');

    设置

    <input class="textbox-text validatebox-text" type="text" autocomplete="off" disabled="disabled" readonly="readonly" placeholder="" style="margin-left: 0px; margin-right: 18px; padding-top: 0px; padding-bottom: 0px;  232.4px; ">
    的背景色为黄色
  • 相关阅读:
    iOS 方便的宏定义
    IOS 推送消息 php做推送服务端
    iOS 7 动画UIDynamicAnimator
    iOS 适配
    ios 实现简单的解析xml网页
    用 MPMoviePlayerController 实现简单的视频下载播放功能
    ios 自定义弹出对话框效果
    ios国外大神
    git学习
    ios 7UI适配方法
  • 原文地址:https://www.cnblogs.com/xiao-fy/p/5103661.html
Copyright © 2011-2022 走看看