ajax加载文件
index.htm
<!doctype html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta http-equiv="Content-Language" content="zh-cn"/>
<meta name="keywords" content="JavaScript,ECMAScript,ajax">
<link rel="stylesheet" type="text/css" href="css/style.css">
<title>JavaScript 全程实例</title>
</head>
<style type="text/css">
body {
text-align: center;
}
div#id-div-ajax {
position: relative;
width: 400px;
height: auto;
border: 0px solid black;
margin: 32px auto;
padding: 2px;
font: normal 14px/1.2em "Microsoft Yahei", arial, sans-serif;
}
div#id-div-ajax-response {
margin: 8px auto;
text-align: center;
}
div#id-div-ajax-response table th {
padding: 4px;
font: bold 14px/1.2em "Microsoft Yahei", arial, sans-serif;
font-style: italic;
text-align: center;
}
div#id-div-ajax-response table td {
padding: 4px;
font: normal 12px/1.0em "Microsoft Yahei", arial, sans-serif;
font-weight: normal;
text-align: left;
}
</style>
<body>
<header>
<nav>JavaScript Ajax应用 - 使用Ajax轻松加载文件</nav>
</header>
<hr>
<div id="id-div-ajax" style="">
<input type="button" onclick="on_my_ajax();" value="通过Ajax框架加载文件"/><br><br><br>
<div>解析文件内容:</div><br>
<div id="id-div-ajax-response"</