Web page design of jQuery_1. Know jQuery

1. Know jQuery

Let’s get to know this jQuery first.

According to the encyclopedia, jQuery is a fast and brief JavaScript framework that encapsulates the commonly used function codes of JavaScript, and also optimizes HTML documents, event handling, animation, etc. In other words, this jQuery is an advanced JavaScript. The reason why we Not learning this JavaScript is also because this thing can’t keep up with the times, but if you can’t keep up, you can’t keep up, but you have to know a little bit. Here I have prepared a tutorial for everyone, you can take a look: "W3school_JavaScript"

Be sure to watch it, otherwise it will be very difficult to watch

By the way, the official website of jQuery is: https://jquery.com/

By the way, get to know the logo

2. Download jQuery

We log on to the official website, then find Download, and click

Click here to download. When I posted this blog, this version was 3.5.1. Maybe when you saw it, this version has been updated to a higher level. It doesn’t matter.

Xunlei download is recommended. My internet is not good and the download does not work. Download link address: https://code.jquery.com/jquery-3.5.1.min.js

Three, use jQuery to write a Helloworld

Open our project, then copy this jquery-3.5.1.min to the project

Then we create a new directory for the development of our Helloworld

We introduce jQuery into html using the script tag

To this, after the introduction, we will write an example, click a button, and then trigger an effect, pop up a dialog box and output hello, world

We first write a button

Those who have learned this JavaScript, we can use the previous method to do it

Then we click this button

You can see this pop-up box, let's use jQuery

We assign an id to the DOM to be manipulated, and then we write

Then we refresh the page, and then click the button, we will find that there is no prompt box, and there is no error in the console. How to solve this problem? We only need to put this introduction and script below the body.

Let's click again

It's OK, so we use this jQuery to make a helloworld.

 

Get to know me first, and then we will talk in detail later, if you don’t understand, you can contact my QQ: 2100363119

Guess you like

Origin blog.csdn.net/weixin_45908370/article/details/108949052