Home > Web Front-end > JS Tutorial > JQuery learning transcript simple JQuery_jquery

JQuery learning transcript simple JQuery_jquery

WBOY
Release: 2016-05-16 17:54:24
Original
996 people have browsed it

Introduction to JQuery
Disadvantages of ordinary JavaScript: The operation methods of each control are not uniform, and there are differences in different browsers. It is very troublesome to write cross-browser programs. Therefore, many JavaScript encapsulation libraries have emerged, such as Prototype, Dojo, ExtJS, JQuery, etc. These libraries encapsulate JavaScript and simplify development. These libraries are encapsulation of JavaScript, that is, we call a function of JQuery. This function inside JQuery helps us call dozens of codes in JavaScript, because JQuery is some function classes written in JavaScript syntax, and the internal implementation is still called JavaScript. , so it does not replace JavaScript. Using JQuery code, writing JQuery extension plug-ins, etc. still require JavaScript technology. Jquery itself is a bunch of JavaScript functions.
 Why choose JQuery?
                                         ifier                                 ifier                                ded less, do ′′ do more), and many big companies are currently supporting JQuery, such as Microsoft, which has inherited JQuery in vs2010.
 What can JQuery do?
  What JQuery can do, ordinary Dom can do, and what ordinary Dom can do, JQuery can also do. Simple JQuery

Copy code The code is as follows:
  



  Equivalent to the Onload event, but Onload can only register one event, while JQuery can register multiple events
JQuery object
  jQuery object cannot use the methods of DOM object, and DOM object cannot use the method of jQuery object, but they can be converted to each other
    

Copy code The code is as follows:











 
JQuery object to DOM object
 

Copy code The code is as follows:








< ;/body>



Copy code The code is as follows:










 $.each(array,fn) calls the fn function to process each element of the array arry, and there is no return value

?
Copy code The code is as follows:






< ;/head>



Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template