The solution of importing jquery into idea cannot take effect

In a jsp page, I need to use jquery, then I added the jquery package to the project, and introduced jquery in the jsp page, when using jQuery, I found that the console reported an error $ is not defined

At a glance, you know that jquery does not take effect, and the browser cannot parse $. If you are having this problem, it may be the right place. Solve this small problem in minutes.

Cough, my idea is Chinese, don't care, after all, Chinese is convenient to understand the unknown function of idea (this reason is far-fetched)

first step

Enter file-> setting

Second step

Enter Language & Framework-> javascript-> Libraries

third step

As you can see in the picture above, jquery is not ticked, here click the front box with the mouse

the fourth step

First click the minus sign, delete all the paths in the box below, then find the path of jquery in your project, click the plus sign, then copy it in, remember to add file: // in front

OK all the way, OK

Guess you like

Origin www.cnblogs.com/Alitac/p/12731051.html