jQuery输出万年不变的语句“Hello world!”
- 里面用了原生的js和jQuery写了两个嘿嘿 也是体验以下区别:
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>hello world</title>
<script src="js/Jquery.js"></script>
<script>
//1.原生JS的固定写法
window.onload = function(ev){
}
//2.Jquery的固定写法
$(document).ready(function(){
alert("hello word!");
});
</script>
</head>
<body>
</body>
</html>