Ext.QuickTips.init(); Ext.BLANK_IMAGE_URL = 'js/ext3/resources/s.gif'; Ready(function(){ var loginForm = new Ext.FormPanel({ frame:true, method:'POST', border:fal, formId:'form1', name:'form1', //ptyFn, //submit: function(){ //El().dom.action = 'common/ajax/login.jsp'; //连接到服务器的url地址 //El().dom.submit(); //El().dom.elements.length); //}, defaults:{ xtype:'textfield', anchor:'90%' }, items:[{ 请别离开我 name:'urname', id:'urname', fieldLabel:'用户名' },{ name:'password', inputType:'password', fieldLabel:王恩泽'密码' },{ name:'code', fieldLabel:'验证码', anchor:'50%' }], buttons:[{ text:'登录', type:'submit', //第三种方式 handler:function() { quest({ url:'common/ajax/login.jsp', method:'POST', params:{ 'urname':Ext.get("urname").dom.value }, success:function(form, action) { var text = eval("("+sponText+")"); alert('--------------2=' + text.msg); }, failure:function() { alert('--------------1'); } }) } //第二种方式 /* handler:function() { loginForm.form.doAction('submit', { url:'/ext/common/ajax/login.jsp', method:'POST', params:'', success:function(form, action) { //sult); if (sult.msg == 'ok') { //document.location='index.html'; Ext.Msg.alert('成功', sult.msg); } el { Ext.Msg.alert('登陆错误', sult.msg); } }, failure:function(form, action) { Ext.Msg.alert('警告', '用户名或密码错误!'); } }) }*/ //第一种方式 //handler:function() { //loginForm.form.submit(); //} },{ text:'取消', handler:function() { (); } }] }); var win = 半边脸肿new Ext.Window({ title:'window', width:400, frame:true, border:fal, 我的新学校作文 modal:true, resizable:fal, items:loginForm }); win.show(); }); |
ptyFn, submit: function(){ this.getEl().dom.action = 'common/ajax/login.jsp'; //连接到服务器的url地址 this.getEl().dom.submit(); alert(this.getEl().dom.elements.length); }, |
handler:function() { loginForm.form.submit(); } |
handler:function() { loginForm.form.doAction('submit', { url:'/ext/common/ajax/login.jsp', method:'POST', params:'', success:function(form, action) { //sult); 痒郁可唯 if (sult.msg == 'ok') { //document.location='index.html'; Ext.Msg.alert('成功', sult.msg); } el { Ext.Msg.alert('登陆错误', sult.msg); } }, failure:function(form, action) { Ext.Msg.alert('警告', '用户名或密码错误!'); } }) } |
request.tCharacterEncoding("UTF-8"); 天蝎座最恨的星座respon.tContentType("text/html; chart=UTF-8"); String urname = Parameter("urname"); System.out.println("---->>>>>"床垫怎么清洗 + urname); out.print("{success:true, msg:'ok'}"); |
handler:function() { quest({ url:'common/ajax/login.jsp', method:'POST', params:{ 'urname':Ext.get("urname").dom.value }, success:function(form, action) { var text = eval("("+sponText+")"); alert('--------------2=' + text.msg); }, failure:function() { alert('--------------1'); } }) } |
本文发布于:2023-06-29 21:00:21,感谢您对本站的认可!
本文链接:https://www.wtabcd.cn/fanwen/fan/89/1060620.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
留言与评论(共有 0 条评论) |