1

有人可以帮我吗?我希望通过按回车键来触发这个(如下):

<div id="create_new" tabindex="2">
 @Ajax.ActionLink("Create New",
    "create_new", new AjaxOptions { 
    UpdateTargetId="accordion",
    InsertionMode= InsertionMode.Replace,
    HttpMethod = "GET"
    })
 </div>
4

1 回答 1

0

这对我有用:

<div id="create_new">
@Ajax.ActionLink("Create New",
"create_new", "controller_name", null, new AjaxOptions
{
    UpdateTargetId = "accordion",
    InsertionMode = InsertionMode.Replace,
    HttpMethod = "GET"
}, new { tabindex = 2}
)
</div>

只需在链接中使用 tabindex 而不是 div。

于 2013-09-11T16:19:07.817 回答