zoukankan      html  css  js  c++  java
  • 关于jquery与js

    **********jquery 是一个javascript库,极大简化了javascript编程**********

    javascript                                            jquery

                                                               jquery需要引入一个js文件,并且这个js文件在所有js代码之前(自己写的js代码放在最后)

    找到标签

    js : document.getElementByID (Name   Class 等)   Dom对象

    jquery:  $(选择器)                                                     jquery对象

            js与jquery对象的转换

               js  = > jquery     var dom = domcument.getElementById(‘ aa ’) = > $ ( dom )

               jquery = > js       $( ' .aaa ' )   = > $ ( ' .aaa ' ).get(0)  // $( ' .aaa ' )[ 0 ]

    操作内容

    js:js对象(dom)

               表单:dom.value

               非表单:dom.innerHTML

    jquery:jquery对象($)

                表单:$.val ( ) ;      $ .val ( ' 修改后的值 ' );

                 非表单:$.html ( ) ;   $.html ( ' 修改后的值 ' ) ; $.text ( ) ;

    操作属性

    js:dom.style.样式

    jquery:$.attr(属性名,属性值);

                 $.attr(属性名);

    事件

    js:dom.addListeneradfalsdujfaskdjf

          dom.click = function(){  };

    jquery:$onclick( function (  ) {  } ;);

            

  • 相关阅读:
    TC79
    SQL TUNNING
    Oracle PLSQL
    DB String Split sample
    dw websites
    Load xlsx in a folder to RDBMS table with Talend
    Reading WebSites
    SQOOP Load Data from Oracle to Hive Table
    dotnet use regex two samples
    Excel scientific notation issue
  • 原文地址:https://www.cnblogs.com/sword082419/p/8870042.html
Copyright © 2011-2022 走看看