其他分享
首页 > 其他分享> > jQuery

jQuery

作者:互联网

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="https://lib.baomitu.com/jquery/3.6.0/jquery.js"></script>
</head>
<body>

</body>
</html>

CDN引入

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
<!--    <script src="https://lib.baomitu.com/jquery/3.6.0/jquery.js"></script>-->
    <script src="js.html">
    </script>
</head>
<body>

</body>
</html>

文件引入

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="https://lib.baomitu.com/jquery/3.6.0/jquery.js"></script>
<!--    <script src="js.html">-->
<!--    </script>-->
</head>
<body>
<a href=""id="test-jquery">点我试试</a>


<!--公式:$(selector).action()-->

<script>
//选择器就是css选择器
    $("#test-jquery").click(function (){
        alert("试试就试试");
    })
</script>

</body>
</html>

标签:jQuery,Title,--,试试,引入,选择器
来源: https://blog.csdn.net/qq_45326705/article/details/121216956