jQuery 入门

时间:2020-05-01

下载jQuery库文件

官网:https://jquery.com/

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script src="jquery-1.12.5.min.js"></script>
<script>
    // 3种初始化方式,加载顺序,$ ,$(document).ready,$(window).load
    $(window).load(function () {
        console.log('window load');
    });

    $(function () {
        console.log('$');
    });

    $(document).ready(function () {
        console.log('document ready');
    });
</script>
</body>
</html>