<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
<body>
<script src="./jquery.js"></script>
<script>
// 为 document 对象注册 ready 事件,当文件加载完成之后,该事件会被自动触发。
$(document).ready(function(){
console.log('文档加载完成1')
})
// 为了方便书写,jQ 为我们提供了 ready 事件的简写形式:
$(function () {
console.log('文档加载完成2')
})
</script>
</body>
</html>
来源:CSDN
作者:上头upup
链接:https://blog.csdn.net/qq_45802159/article/details/103244885