如何从JQuery Click事件中获取此值? [重复]

问题描述 投票:0回答:1

此问题已经在这里有了答案:

如何从JQuery click事件中获取此值?

enter image description here

我基本上是从这里得到的:console.log(e);

通过Telerik的网格:columns.Command(command => command.Custom("Delete").Click("showDeleteConfirmation").HtmlAttributes(new { style = "width:95%" })).Width(87).Visible(Model.CanEditForm);

function showDeleteConfirmation(e) {
    var grid = $("#RevenueGrid").data("kendoGrid");
    var dialog = $('#DeleteConfirmation').data("kendoDialog");
    console.log(e);
    modelToDelete = grid.dataItem($(e.target).parents('tr'));
    //dialog.content("Are you sure you want to delete this item with ID - " + modelToDelete. + "?");
    dialog.title("Alert");
    dialog.open();
}
javascript jquery telerik telerik-grid
1个回答
0
投票

您可以通过执行e.delegateTarget.baseURI获得值。

© www.soinside.com 2019 - 2024. All rights reserved.