<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
<script type="text/javascript" src="js/jquery-1.8.3.min.js" ></script>
<script type="text/javascript">
document.getElementById("txt").innerHTML="1111";
function init(){
}
window.οnlοad=init;
</script>
</head>
<body>
<div id="txt" >0000</div>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
<script type="text/javascript" src="js/jquery-1.8.3.min.js" ></script>
<script type="text/javascript">
function init(){
document.getElementById("txt").innerHTML="1111";
}
window.οnlοad=init;
</script>
</head>
<body>
<div id="txt" >0000</div>
</body>
</html>
比较上面的两个示例,第一个页面还是显示0000,第二个则显示的是1111