What is jQuery ?
Suppose there are two elements in the page below
<input type="text" id="txt" />
<button type="button" onclick="get_text();">Go</button>
With jQuery, you can simply write
You can see that we use document.getElementById to get the element with the specified id. With jQuery, we only need to use $('#') to do it all.
The main idea of jQuery is to achieve more functionality with less code.
The jQuery library contains the following features:
HTML element selection
HTML element operation
HTML event function
HTML DOM traversal and modification
Tip : In addition to this, Jquery also offers a large number of plugins.
Learn the conditions of jQuery
HTML (including css, the basic knowledge of web pages)
PHP (jQuery belongs to the front-end technology, and the backend is extremely complementary and echoes each other)
Is jQuery suitable for all browsers? The
jQuery community knows that JS has a lot of compatibility issues in different browsers. Currently jQuery is compatible with all major browsers, including Internet Explorer 6!
Let's first look at a jQuery instance.