login.jsp function toServer(){ var xml = "<root>"+ "<name>"+document.all('name').value+"</name>"+ "<pwd>"+document.all('pwd').value+"</pwd>"+ "</root>";
var XMLSender = new ActiveXObject("Microsoft.XMLHTTP" ); XMLSender.Open("POST",'do_login.jsp',false); XMLSender.send((xml)); alert(XMLSender.responseText); //可处理后台返回的结果 }