我JSP的页面是:
<%@ page language="java" contentType="text/html; charset=gb2312"
%>
<script>
function Save(){
xmlHttp=GetXmlHttpObject()
if(xmlHttp==null){
alert("您的浏览器不支持AJAX!");
return;
}
var url="http://localhost:9080/ebrimcsw/AddNode";
url=url+"?name="+document.getElementsById("name").value;
url=url+"&url="+document.getElementById("url").value;
url=url+"&port="+document.getElementById("port").value;
var str="&day="+document.getElementById("day").value+"&hour="+document.getElementById("hour").value+"&min="+document.getElementById("min").value;
xmlHttp.onreadystatechange=stateChanged;
xmlHttp.open("POST",url,true);
xmlHttp.send(str);
}
function GetXmlHttpObject()
{
var xmlHttp=null;
try
{
xmlHttp=new XMLHttpRequest();
}
catch (e)
{
try
{
xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
}
catch (e)
{
xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
}
}
private static final String URL = "jdbc:oracle:thin:@localhost:1521:orcl";
private static final String USERNAME = "sys";
private static final String PASSWORD = "s ......