AJAX

JS:
 if (window.ActiveXObject) {
           xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
           }
         else if (window.XMLHttpRequest) {
             xmlHttp = new XMLHttpRequest();
        }
         xmlHttp.onreadystatechange = function() {
            if(xmlHttp.readyState == 4) {
                   document.getElementById("contentPanl").innerHTML=xmlHttp.responseText;
                    xmlHttp=null;
               
              }
         };

         xmlHttp.open("POST", "admin/couponEdit.do?action=selectUserList",true);
         xmlHttp.setRequestHeader("Content-Type", "text/html");

         xmlHttp.send(null);
ACTION:
      PrintWriter out=response.getWriter();
            out.write("您输入的验证码错误!");
            out.close();
           return null;

posted on 2009-10-15 11:16  xinxinbb  阅读(151)  评论(0编辑  收藏  举报