我的页面中有表单,我正在使用ajax.beginform()。在这个表单中,我有提交按钮。在提交输入按钮的时候想要形式的行动。 以下是可能对您有用的代码段。
@using (Ajax.BeginForm("FormContainer", "Form", new AjaxOptions { UpdateTargetId = "HeaderMain", HttpMethod = "Post", InsertionMode = InsertionMode.Replace }))
{
<input name="" type="submit" value="Request" class="propel-viewDetailsButton" />
}
点击输入按钮我想调用java scrip t函数,我想要一个表单的动作
答案 0 :(得分:0)
$(".propel-viewDetailsButton").click(function() {
var action = this.closest("form").prop("action");
}
应该这样做:)