Difference between jQuery and javascript: jqueryjavascript
JQuery is coming to an end. Adding a summative blog is perfect.
JQuery has fewer writes, more operations, and core concepts. Everyone said, "With jQuery, drinking tea and water every day", this is standing on the shoulders of giants. Let's start with the B/S project. At that time, when instructor Niu took us together to do the "Niuke news publishing system", he mentioned that at that time we were also blind people, and now we still need to compare it with the previous knowledge, make a summary.
First, let's talk about the difference between jQuery and javascript, and compare the efficiency, which is not bad. First, you must understand that jQuery is the most popular javascript library.
The disadvantage of javascript is that the processing results may be different in different browsers. Security issues. javascript may be exploited by hackers because it runs on the client, and the processing results may be different in different browsers.
The biggest benefit of jQuery is that a small amount of code is used to do more things. Let's look at an example.
Javascript code:
document.getElementById(‘elementid').value
JQuery code:
$(‘#elementid').val();
Compared with javascript, jQuery syntax is simpler. With jQuery, you can easily browse documents, select elements, process events, add efficiency lights, and allow developers to customize plug-ins.
Advantages of jQuery:
JQuery Eliminates cross-platform javascript compatibility issues. jQuery is easier to use than others. jQuery has a huge function library, which is my favorite.
Everything has two sides. jQuery's disadvantage is that it is not the original javascript language, and it may be difficult to understand. It's hard to start with everything. The project must contain the jQuery library file. If there are multiple versions of the jQuery library, a conflict will occur.
There will be some jQuery technical summaries later. To be continued .....
What is the difference between jquery and javascript?
JavaScript is a scripting language that is mainly used in browsers to perform operations on document objects on webpages and process user interaction actions.
JQuery, however, is a JavaScript code library (or a library used to be called a class library). It brings together functions that are frequently used in JavaScript development for developers to use directly, instead of using native JavaScript statements to write a large amount of code, you can achieve consistent results across different browsers. Is one of the most popular JavaScript libraries.
1. jQuery, as a JavaScript code base, is naturally written in JavaScript.
2. jQuery code is very standard and highly efficient in execution. It is an excellent example of JavaScript code.
3. In many cases, most JavaScript functions can be implemented by using jQuery.
PS: for example, the program language is a raw material, the code library is a semi-finished product made of raw materials, and your program project is a finished product. You can choose to directly use raw materials or add some semi-finished products. Of course, you can use raw materials more freely, while using semi-finished products is more efficient.
What is the difference between js and jquery?
Document. getElementById ("id value"). value =$ ("# id value"). val ()
The above example shows the difference between js and jquery. It uses the id value to obtain information. Js writing on the left and jquery writing on the right
You can understand jquery as a js package to make js simpler and faster. It encapsulates the same operations and calls them directly when used.