gpt4 book ai didi

Jquery 调用 mvc 网格中的编辑按钮单击

转载 作者:行者123 更新时间:2023-12-01 05:31:10 25 4
gpt4 key购买 nike

下面是网格列

 grid1.Column("", header: "Edit", format: @<text>@Html.ActionLink("Edit", "EditEmployee", "BootStrap", new { id = item.empId }, new { target = "_blank" })</text>)

如果我点击上面的编辑按钮,我想编写jquery函数来打开下面的div

<div id="editView">
@Html.Partial("~/Views/BootStrap/EditEmployee.cshtml",new EmployeeModel.Employee2())
</div>

最佳答案

试试这个:

grid1.Column("", header: "Edit", format: @<text>@Html.ActionLink("Edit", "EditEmployee", "BootStrap", new { id = item.empId }, new { target = "_blank", id = "myBtn" })</text>)

JS:

$("#myBtn").click(function(){
$("#editView").show() //or open in dialog, or I don't know.
})

关于Jquery 调用 mvc 网格中的编辑按钮单击,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37209984/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com