php代码
<?php Class semester extends CI_Controller { public function index() { echo '{"success":true}'; } } ?>
ExtJS 代码
var form=this.up('form').getForm(); form.url = 'http://localhost/anju/index.php/semester'; form.method = 'POST'; form.submit({ success: function (form, action) { alert("Success: " ); }, failure: function (form, action) { alert("Failure: " ); } });
到目前为止,我无法发出成功消息:(有人可以告诉我为什么它失败了吗?