52,797
社区成员
发帖
与我相关
我的任务
分享
<%
String name = request.getParameter("name");
System.out.println(name);
//PrintWriter pw = response.getWriter();
if(name.equals("xx"))
{
//JSONValue v = new JSONValue();
//v.parse(name);
//System.out.println(v.toString());
//System.out.println("ok");
out.print("{success:true,msg:'ok'}");
}
onSubmit: Ext.emptyFn,
submit: function() {
//有疑问的地方
this.getEl().dom.action='<%=path%>/init.do?param=login';
this.getEl().dom.submit();
},
//提交到服务器操作
simple.form.doAction('submit',{
url:'check.jsp',//文件路径
method:'post',//提交方法post或get
params:'',
//提交成功的回调函数
success:function(form,action){
if (action.result.msg=='ok') {
document.location='index.html';
} else
{
Ext.Msg.alert('登入错误',action.result.msg);
}
},
//提交失败的回调函数
failure:function(){
Ext.Msg.alert('错误','服务器出现错误请稍后再试!');
}
});