js文件:
hello.js
function test(){
alert("hello");
}
//window.onload=test;
//加载JavaScript $(document).ready(test);//加载jQuery
test文件:
test.html
<html>
<head>
<script type="text/javascript" src="jquery-1.4.4.js"></script>
<script type="text/javascript" src="hello.js"></script>
</head>
<body>
</body>
</html>
本文介绍了一个简单的HTML页面如何通过引入jQuery库并使用JavaScript文件定义一个函数,该函数会在页面加载完成后通过jQuery的方式被调用。
1061

被折叠的 条评论
为什么被折叠?



