<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jQuery入口函数的其他写法</title>
<script src="https://cdn.bootcdn.net/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script>
//1、第一种写法
$(document).ready(function(){
alert("Hello jQuery1!");
});
//2、第二种写法
jQuery(document).ready(function(){
alert("Hello jQuery2!");
});
//3、第一种写法
$(function(){
alert("Hello jQuery3!");
});
//4、第一种写法
jQuery(function(){
alert("Hello jQuery4!");
});
</script>
</head>
<body>
</body>
</html>
02-jQuery入口函数的其他写法
最新推荐文章于 2020-12-15 10:49:17 发布