跳转页面

来源:百度知道 编辑:UC知道 时间:2024/05/15 08:11:19
jsp用ajax做跳转到另外一个页面怎么做??

可以使用Ajax

————aaa.asp 文件————————————
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Using responseText with innerHTML</title>
<meta charset="gb2313">
<script type="text/javascript">
var xmlHttp;
function createXMLHttpRequest() {
if (window.ActiveXObject) {
xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
}
else if (window.XMLHttpRequest) {
xmlHttp = new XMLHttpRequest();
}
}
function startRequest() {
createXMLHttpRequest();
xmlHttp.onreadystatechange = handleStateChange;
//xmlHttp.open("post", "bb.html", true);
xmlHttp.open("POST", 'bbb.asp?name='+document.getElementById("name").value + "&pwd=" + document.getElementById("pwd").value, true);