zoukankan      html  css  js  c++  java
  • jQuery获取标签信息

    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="utf-8"/>
        <title>第一个简单的jQuery程序</title>
        <style type="text/css">
            div{
                padding:8px 0px;
                font-size:12px;
                text-align:center;
                background:#00ffff;
            }
          .b{background:red;
             position:relative;
             top:10px;}
        </style>
        <script src="https://www.imooc.com/static/lib/jquery/1.9.1/jquery.js"></script>
        <script type="text/javascript">
                        $(document).ready(function() {
                        $(".a").html("您好!");<!--.a和css类选择器类似,即""内就是链接到对应的html标签进行设置-->
                });
        </script>
      
    </head>
    <body>
        <div class="a"></div>
        <div class="b">ftdr</div>
        <script type="text/javascript">
          var $div = $('div');
          var div = $div.get[0];
          div.style.color = 'blue';
        </script>
    </body>
    </html>

    红尘往事,一切随风!
  • 相关阅读:
    bzoj2959
    学习笔记::lct
    bzoj3203
    bzoj1319
    bzoj3625
    bzoj3992
    bzoj1565
    bzoj3513
    平常练习动归(1.胖男孩)———最长公共子序列
    2016 noip 复赛 day2
  • 原文地址:https://www.cnblogs.com/xwenwu/p/13630006.html
Copyright © 2011-2022 走看看