我有以下Javascript:
var form = $(formArray[i]);
var formAction = form.attr("action");
var button = form.find("input:submit");
button.click(function (formAction, form) {
return function () {
var formAjaxAction = formAction.replace(originalString, ajaxString);
ajaxPostHandler(for
在我的控制器上有一个操作,它接受在发布表单时应该捕获的两个参数:
[HttpPost]
public ActionResult Index(MyModel model, FormAction action)
其思想是,模型数据应在MyModel中捕获,而用户按下的按钮应在FormAction中捕获。
public class MyModel
{
public string MyValue { get; set; }
}
public class FormAction
{
public string Command { get; set; }
}
以下是我的看法:
@model
现在,我正在尝试编写一个允许我访问成员函数的函数。有问题的代码看起来有点像这样:
protected $formName;
protected $formClass;
protected $formAction;
protected $formMethod;
protected $formObjArray = array(); //outputs in order. So far it should only take newLine, selectTag, inputTag, textTag.
protected $submitBtnVal;
protected $encType;
fun