jquery Load方法

1.html

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>Untitled Document</title>

<script type="text/javascript" src="jquery-1.4.2.js"></script>

<script type="text/javascript">

$(function(){

$("#divBoxs").load("2.html",{name:"zhang"},function(){

alert(2);

});

 

});

</script>

</head>

<body>

<div id="divBoxs">

   

    </div>

</body>

</html>


2.html

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>Untitled Document</title>

</head>

<body>

<div id="divBox" style="width:300px; height:300px; border:1px solid #99bbe8;">

    hello word;

    </div>

</body>

</html>


猜你喜欢

转载自javaeedevelop.iteye.com/blog/1291889