0
我正在使用ASP.NET MVC,並且有一個帶有簡單文本框和按鈕的視圖頁來伴隨它。我希望AJAX在用戶單擊搜索按鈕時提交表單。響應(搜索結果)將返回並顯示在同一頁面上的內容div中。使用ExtJS和ASP.NET MVC提交AJAX表單
我已經用JQuery成功完成了這個任務,但是我需要在ExtJS中使用相同的功能。
這裏是JQuery的(在形式ID是#helpsearchbox和#helpcontent是我想要的結果被加載到內容DIV的id):
$(function() {
$("#helpsearchbox form").submit(function(e) {
$.post($(this).attr("action"),
$(this).serialize(),
function(data) {
$("#helpcontent").html(data);
});
e.preventDefault();
});
});
Can someone please help me write the equivalent function in ExtJS? Many thanks!