Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有人可以帮我吗?我希望通过按回车键来触发这个(如下):
<div id="create_new" tabindex="2"> @Ajax.ActionLink("Create New", "create_new", new AjaxOptions { UpdateTargetId="accordion", InsertionMode= InsertionMode.Replace, HttpMethod = "GET" }) </div>
这对我有用:
<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。