有人可以帮我吗? 我想通过按Enter键来触发这个(下面):
<div id="create_new" tabindex="2">
@Ajax.ActionLink("Create New",
"create_new", new AjaxOptions {
UpdateTargetId="accordion",
InsertionMode= InsertionMode.Replace,
HttpMethod = "GET"
})
</div>
答案 0 :(得分: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。