下面是Grid列
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>
答案 0 :(得分:0)
试试这个:
grid1.Column("", header: "Edit", format: @<text>@Html.ActionLink("Edit", "EditEmployee", "BootStrap", new { id = item.empId }, new { target = "_blank", id = "myBtn" })</text>)
$("#myBtn").click(function(){
$("#editView").show() //or open in dialog, or I don't know.
})
答案 1 :(得分:0)
试试这个
function EditEmployee()
{
$("#editView").show();
}
Jquery功能
exec