日期:2014-05-17 浏览次数:20736 次
<%@ page language="java" import="java.util.*, java.sql.*, com.jm.gy.*" pageEncoding="GB18030"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<title>电脑详细信息</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
<script type="text/javascript">
<!--
function change(str){
var xmlHttp;
//document.write(str);
//document.getElementById("txtHint").innerHTML="welcome";
if(str=""){
document.getElementById("txtHint").innerHTML="";
return;
}
if(window.XMLHttpRequest()){ // code for IE7+, Firefox, Chrome, Opera, Safari
xmlHttp = new XMLHttpRwquest();
}else if(window.ActiveXObject){ // code for IE6, IE5
xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
}
xmlHttp.onreadystatechange = callback;
xmlHttp.open("GET","SQLQuery.jsp?q="+escape(str),true);
xmlHttp.send(null);
}
function callback(){
if(4==xmlHttp.readyState && 200==xmlHttp.status){
alert("正常");
document.getElementById("txtHint").innerHTML=xmlHttp.resqonseText;
}
}
</script>
</head>
<body>
<center><h1>电脑信息详情</h1></center>
<center>
请选择要查询的部门:
<select name="dept" id="dep" size="1" onchange="change(this.value)">
<option value="a">全部单位
<option value="5">5
<option value="6">6
</select>
<br />
<br />
<div id="txtHint">客户信息将在此处列出 ...</div>
</center>
<br />
<a href="Addition.jsp">添加新电脑</a>
</body>
</html>
<%@ page language="java" import="java.util.*, java.sql.*, com.jm.gy.*" pageEncoding