1.安装

使用软件:webSrorm


安装路径:H:\1学习资料\1前端\Jquery\train>

安装过程:在H:\1学习资料\1前端\Jquery\train所在的Webstorm的Terminal窗口中输入npm install jquery

使用npm安装jQuery与验证

出现`-- [email protected]

安装成功

2.验证


在trian文件夹中新建test.html,进行测试

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>测试jQuery</title>
    <script src="jquery/dist/jquery.js">
    </script>
    <script>
        $(document).ready(function(){
            $("p").click(function(){
                $(this).hide();
            });
        });
    </script>
</head>
<body>
<p>如果你点我,我就会消失。</p>
<p>继续点我!</p>
<p>接着点我!</p>
</body>
</html>


相关文章:

  • 2021-08-11
  • 2021-09-03
  • 2021-12-16
  • 2021-08-26
  • 2021-05-22
  • 2022-12-23
  • 2021-05-26
  • 2022-02-10
猜你喜欢
  • 2021-06-12
  • 2021-04-24
  • 2021-11-22
  • 2021-07-22
  • 2022-01-21
  • 2022-12-23
相关资源
相似解决方案