zoukankan      html  css  js  c++  java
  • jquery Dom Core

    1. DOM Core:
    
    JavaScript 中的getElementById(),getElementsByTagName(),
    
    getAttribute()和setAttribute()等方法,这些都是DOM Core的组成部分
    
    
    node2:/var/www/html/jquery#cat p1.html 
    <html>
     <head>
     <title>dom</title>
     </head>
     <body>
      <p title="选择你最喜欢的水果.">你最喜欢的水果是?</p>
     <ul>
       <li title='苹果' id='aaa'>苹果</li>
       <li title='橘子' id='bbb'>橘子</li>
       <li title='菠萝' id='ccc'>菠萝</li>
       <li title='水蜜桃' id='aaa'>菠萝</li>
      </ul>
      </body>
      </html>
    <script type="text/javascript" src="jquery-2.2.2.min.js"></script>    
    <script type="text/javascript" src="p1.js"></script> 
    node2:/var/www/html/jquery#
    node2:/var/www/html/jquery#cat p1.js
    console.log(document.getElementById('aaa'));
      

  • 相关阅读:
    8.09_python_lx_shopping
    8.06_python_lx_day25
    8.05_python_lx_day24
    8.05_python_lx_day23
    8.03_python_lx_day21<2>
    Java注解
    Java多线程04
    Java多线程03
    Java多线程02
    Java多线程01
  • 原文地址:https://www.cnblogs.com/hzcya1995/p/13348804.html
Copyright © 2011-2022 走看看