1 回答

TA貢獻1757條經驗 獲得超7個贊
Ext.form.Panel 不包含表單標記。此功能用于真正的html表單??纯聪旅胬拥恼埱螅盒√崆?/p>
Ext.application({
name: 'Fiddle',
launch: function () {
Ext.create('Ext.button.Button', {
text: "Submit",
renderTo: Ext.getBody(),
handler: function () {
Ext.Ajax.request({
url: 'user.json',
form: Ext.fly('userForm').dom,
success: function (response, opts) {
var obj = Ext.decode(response.responseText); // THIS IS A REAL HTML FORM
console.dir(obj);
},
failure: function (response, opts) {
console.log('server-side failure with status code ' + response.status);
}
});
}
})
}
});
添加回答
舉報