jQuery-获取超链接.navigateurl的值

P.B*_*key 0 asp.net jquery

asp:hyperlink通过以下jQuery 将点击绑定到一系列

$(".dummyIdentifier").click(function () {
            $("#divLineItemComments").dialog("open");
            return false;
        });
Run Code Online (Sandbox Code Playgroud)

这很好。现在,我需要传递Hyperlink.NavigateUrl的值OnClick。这样我就可以将值包含在ajax中$.get()

如何获得单击的超链接的值?我不知道它的ID,因为超链接是由ASP.NET与其名称一起动态生成的。

        <asp:TemplateField HeaderText="Notes" ItemStyle-CssClass="NoMargin NoPadding" SortExpression="lineNotes">
            <ItemTemplate>
                <asp:HyperLink id="notesHl" runat="server" text='<%# Bind("lineNotes") %>' Font-Underline="true" Font-Bold="true" CssClass="dummyPhysicalNoteIdentifier"></asp:HyperLink>
            </ItemTemplate>
            <ItemStyle Font-Size="Smaller" Height="10px" Width="10px" Wrap="True" />
        </asp:TemplateField>
Run Code Online (Sandbox Code Playgroud)

jcv*_*dan 5

您可以这样做:

$(".dummyIdentifier").click(function () {
    $("#divLineItemComments").dialog("open");

    var url = $(this).attr('href');

    return false;
 });
Run Code Online (Sandbox Code Playgroud)