<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<style type="text/css">
body{
font-size: 13px;
}
.divFrame{
width: 260px;
border: 1px solid #666666;
}
.divFrame .divTitle{
padding: 5px;
background-color: #EEEEEE;
text-align: center;
}
.divFrame .divContent {
padding: 8px;
}
.divFrame .divContent .clsShow{
font-size: 14px;
}
.btn{
border: 1px solid #666666;
padding: 2px;
width: 80px;
}
</style>
<script>
var objXmlHttp = null;
function createXmlHttp() {
if(window.ActiveXObject)
{
objXmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
}
else
{
if(window.XMLHttpRequest)
{
objXmlHttp = new XMLHttpRequest();
}
else
{
alert("初始化XmlHttp错误!");
}
}
}
function getSendData() {
document.getElementById("divTip").innerHTML = "<img alt='jpg' title='正在加载中...' src='images/loading.gif'>";
var strSendUrl = "t97(6-1b).html?date=" + Date();
createXmlHttp();
objXmlHttp.open("GET",strSendUrl,true);
objXmlHttp.onreadystatechange = function () {
if(objXmlHttp.readyState == 4)
{
if(objXmlHttp.status == 200)
{
document.getElementById("divTip").innerHTML = objXmlHttp.responseText;
}
}
}
objXmlHttp.send(null);
}
</script>
</head>
<body>
<div class="divFrame">
<div class="divTitle">
<input type="button" id="button1" value="获取数据" onclick="getSendData()" class="btn">
</div>
<div class="divContent">
<div id="divTip"></div>
</div>
</div>
</body>
</html>
t97(6-1b).html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<div class="clsShow">
姓名:虾米大王<br>
性别:男<br>
邮箱:modern358@163.com
</div>
</body>
</html>