[問題] .getForm().submit()?
Ext.onReady(function(){
Ext.QuickTips.init();
Ext.form.Field.prototype.msgTarget = 'side';
var bd = Ext.getBody();
var create_form = new Ext.FormPanel({
title: '輸入帳號登入',
url: 'save.php',
bodyStyle:'padding:5px 5px 0',
defaults: {width: 230},
defaultType: 'textfield',
items: [{
fieldLabel: '帳號',
name: 'account',
allowBlank:false
},{
fieldLabel: '密碼',
name: 'pass',
inputType : "password",
allowBlank:false}],
buttons: [{
text: '送出',
handler: senddata},{
text: '重設',
handler: function(){
create_form.getForm().reset();
}
}]
});
function senddata() {
if (create_form.getForm().isValid())
{
create_form.getForm().submit();
Ext.MessageBox.alert('狀態', '資料已送出');
} else {
Ext.MessageBox.alert('狀態', '不能為空的');
}
}
create_form.render(document.body);
});
如果要將save.php的值傳回來要怎麼寫呢?
$.POST嗎?
新手剛學jquery
所以很多不知道= ="
請多多包含
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 203.64.183.226
→
12/23 11:14, , 1F
12/23 11:14, 1F
→
12/23 11:17, , 2F
12/23 11:17, 2F
推
12/23 11:26, , 3F
12/23 11:26, 3F
→
12/23 11:28, , 4F
12/23 11:28, 4F
→
12/23 11:35, , 5F
12/23 11:35, 5F
→
12/23 11:36, , 6F
12/23 11:36, 6F
→
12/23 11:37, , 7F
12/23 11:37, 7F
→
12/23 12:46, , 8F
12/23 12:46, 8F
→
12/23 12:51, , 9F
12/23 12:51, 9F
→
12/23 12:52, , 10F
12/23 12:52, 10F
→
12/23 17:06, , 11F
12/23 17:06, 11F
→
12/23 17:06, , 12F
12/23 17:06, 12F
→
12/23 17:07, , 13F
12/23 17:07, 13F
→
12/23 17:09, , 14F
12/23 17:09, 14F
→
12/23 17:10, , 15F
12/23 17:10, 15F
→
12/23 17:11, , 16F
12/23 17:11, 16F
→
12/23 18:42, , 17F
12/23 18:42, 17F
→
12/24 10:47, , 18F
12/24 10:47, 18F
→
12/24 10:47, , 19F
12/24 10:47, 19F
討論串 (同標題文章)
完整討論串 (本文為第 1 之 3 篇):