到目前为止我有这个:
<% foreach (Object object in Collection)
{
u<% using (Html.BeginForm("ActionName", "Controller", new { FU = "bar" }, FormMethod.Post, new { ID = "MyID"}))
{%>
<input type="submit" value="Submit" />
<%}
} %>
$('#MyID').submit(function() {
var url = Url.Action("ActionName", "ControllerName");
var fu = "newValueOfFU"; // New value for FU
$('#MyID').prop('action', url + "?FU=" + fu);
});
我想用 jQuery 的值改变 FU 的值