日期:2014-05-17 浏览次数:20703 次
$.ajax({ type: "POST", url: "http://127.0.0.1:8080/myweb"+inputobj.attr("ajaxurl")+"?"+ new Date().getTime(), data: "param="+$(this).val(), dataType: "text", beforeSend:function(){alert("gogo--");}, success: function(s){ if(s=="y"){ inputobj.attr("valid","true"); $.fn.Validform.sn.showmsg(tipmsg.r,settings.tiptype,{obj:inputobj,type:2},"hide"); }else{ inputobj.attr("valid",s); errorobj=inputobj; $.fn.Validform.sn.showmsg(s,settings.tiptype,{obj:inputobj}); }
/** * 检查用户昵称是否存在 */ public void checkUserName(){ String nikeName = param; System.out.println("===================================="); System.out.println(nikeName); System.out.println("===================================="); if(us.checkName(nikeName)){ System.out.println("=======我知道这里写的不对,但是不知道怎么写,因为是struts2的,struts1还好说=============="); this.setInfor("y"); }else{ this.setInfor("n"); } }