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

servlet ajax 校验后台用户

function subAjax(){

?

function subAjax(){?

? ? ? ?$.post("dataelement.do?type=queryById&exportSfCardId="+encodeURI(encodeURI($("#exportSfCardId").val() ) ),

? ? ? ?function(wjy){ ?

? ? ? ?if(wjy==1){ ?

? ? ? ? ? ? ? ?alert("您输入的身份证号已存在!"); ?

? ? ? ? ? ?}?

? ? ? ? ? ?

? ? ? ?}); ?

? ?} ?

后台是servlet 用?if (srt.getResult().equals("1"))?

{?

PrintWriter out = response.getWriter();

out.println("1");

? ? ? ?out.flush();

? ? ? ?out.close();

}?

?