日期:2014-05-16 浏览次数:20712 次
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
<% String a=request.getParameter("username");
out.print(a);
%>
<Iframe name="frame1" id="frame1" src="au.jsp"; width="250" height="200" scrolling="no" frameborder="1"></iframe>
</body>
</html>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<script language="javascript"><!--
var XMLHttpReq;
function createXMLHttpRequest() {
if(window.XMLHttpRequest) {
XMLHttpReq = new XMLHttpRequest();
}
else if (window.ActiveXObject) {
try {
XMLHttpReq = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {
XMLHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
} catch (e) {}
}
}
}
var username ="aaaa";
function sendReques() {
createXMLHttpRequest();
var url = "auto.jsp?username="+username;
alert(username);
XMLHttpReq.open("get", url, true);
XMLHttpReq.onreadystatechange = processResponse;//
XMLHttpReq.send(null); //
}
// --></script>
</head>
<body>
<form name=staffInput >
<input type="button" value="" onClick="sendReques()"/>
</form>
</body>
</html>