【php开源代码栏目提醒】:网学会员鉴于大家对php开源代码十分关注,论文会员在此为大家搜集整理了“chakan.php”一文,供大家参考学习
<?php
header("cache-control:no-cache,must-revalidate");
?>
<html>
<head>
<script type="text/javascript">
var xmlHttp;
function createXMLHttpRequest(){
if(window.ActiveXObject){
xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
}
else if(window.XMLHttpRequest){
xmlHttp=new XMLHttpRequest();
}
}
function validate(){
createXMLHttpRequest();
var url="getChakan.php";
xmlHttp.open("GET",url,true);
xmlHttp.onreadystatechange=callback;
xmlHttp.send(null);
}
function callback(){
if(
xmlHttp.readyState==4){
if(xmlHttp.status==200){
show();
}
}
}
function show(){
//alert(xmlHttp.responseXML.xml);
var xmlDoc=xmlHttp.responseXML;
var yan=xmlDoc.getElementsByTagName("content");
var ta="<table style='width:100%;background-color: #F9FBFD; border-top-width: 1px;border-top-style: solid; border-right-style: solid;border-bottom-style: solid; border-left-style: solid; border-top-color: #CDD9E7; border-right-color: #CDD9E7; border-bottom-color: #CDD9E7; border-left-color: #CDD9E7; border-right-width: 1px; border-bottom-width: 0px; border-left-width: 1px;'><th>名称</th><th>作者</th><th>出版社</th><th>ISBN号</th><th>图书类型</th><th>价格</th>";
for(var i=0;i<yan.length;i++){
var y=yan[i];
ta+="<tr><td>"+y.childNodes[1].firstChild.data+"</td>";
ta+="<td>"+y.childNodes[2].firstChild.data+"</td>";
ta+="<td>"+y.childNodes[3].firstChild.data+"</td>";
ta+="<td>"+y.childNodes[4].firstChild.data+"</td>";
ta+="<td>"+y.childNodes[5].firstChild.data+"</td>";
ta+="<td>"+y.childNodes[6].firstChild.data+"</td></tr>";
}
ta+="</table>";
document.getElementById("res").inner
HTML=ta;
}
</script>
</head>
<body onLoad="validate()" style="font-family: '新宋体'; font-size: 12px; margin:0;">
<center>
<center>
<table width="90%" cellpadding="0" cellspacing="0">
<tr>
<td background="../image/headerbg.jpg"><img src="../image/Header.jpg"></td>
</tr>
</table>
</center>
<center>
<div style="width:90%;">
<fieldset>
<legend>图书显示</legend>
<div id="res"></div>
<p align="center">|<a href="addBook.php">数据添加</a>|<a href="deleteBook.php">数据删除</a>|<a href="update.php">数据修改</a>|</p>
</fieldset>
</div>
</center>
<table width="90%" style="font-size:12px;border-top-style:solid;border-bottom-style:none;border-right-style:none;border-left-style:none;" cellspacing="0" cellpadding="4" align="center">
<tr>
<td> <div align="center">
IT在中国电脑
学习网!@2008</br>
公司地址:郑州市二七路200号金博大D座2708室</br>
电话:66202195
电子邮件:<A HREF='mailto:liuhaisong9462@sohu.com'></A> itzcn@126.com
</div></td>
</tr>
</table>
</body>
</html>