<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<script src="jquery.min.js"></script>
<script>
$(function(){
$("#btn").click(function(){
$("#a").load("load_content.html",function(responseText,textStatus,XMLHttpRequest){
alert(responseText);
alert(textStatus);
$("#a").load("load_content.html");
});
return false;
});
});
</script>
</head>
<body>
<form id="form1" name="form1" method="post" action="" style="background-color:gray">
<label for="textfield">用户名:</label>
<input type="text" name="textfield" id="name" />
<input id="btn" type="submit" value="提交" />
</form>
<br />
<div id="a"></div>
</body>
</html>
载入的html文档
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
</head>
<body>
<div><h1>我是中国</h1></div>
</body>
</html>