日期:2014-05-16  浏览次数:20579 次

servlet ajax 返回

<script type="text/JavaScript">

?

var xmlhttprequest;

function CreateRequest()

{

??? if(window.ActiveXObject){

??????? return new ActiveXObject("Microsoft.XMLHTTP");

??? }else if(window.XMLHttpRequest){

??????? return new XMLHttpRequest();

??? }

}

?

function CheckUser(){

??? var vuid=document.getElementById("textfield").value;?

??? var vpass=document.getElementById("textfield2").value;

??? var vauthorn=document.getElementById("choicefield").options[window.document.getElementById("choicefield").selectedIndex].value;

?

??? if((vuid=='')||(vpass=='')){

??? ??? if(vuid==''){

??? ??????? alert("用户名不能为空!");

??? ??? }else if(vpass==''){

??? ??????? alert("密码不能为空!");

??? ??? }else {

???