我有一个“div”标签 id is 'modal'。同一页面中有一个网格。网格显示文档详细信息。因此,当我单击网格中的链接按钮时,我需要弹出一个模式窗口。我的页面也有一个母版页.. 那么我该怎么做...当我单击链接按钮时没有任何反应...
<asp:GridView ID="grd_review" runat="server" AutoGenerateColumns="False"
DataKeyNames="DOC_ID" EnableModelValidation="True"
onselectedindexchanged="grd_review_SelectedIndexChanged"
onrowcommand="grd_review_RowCommand" onrowdeleting="grd_review_RowDeleting"
CellPadding="4" ForeColor="#333333" GridLines="None" Width="100%"
Height="233px">
<AlternatingRowStyle BackColor="White" />
<Columns>
<asp:BoundField DataField="DOC_ID" HeaderText="id" Visible="False" />
<asp:BoundField DataField="DOC_NAME" HeaderText="Doc Name" />
<asp:BoundField DataField="UserName" HeaderText="Created By" />
<asp:BoundField DataField="CREATE_DATE" HeaderText="Created Date" />
<asp:TemplateField HeaderText="FileName">
<ItemTemplate>
<asp:LinkButton ID="lnk_file" runat="server"
CommandArgument='<%# Eval("DOC_ID") %>' CommandName="doc"
Text='<%# Eval("FILE_NAME") %>'></asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Review">
<ItemTemplate>
<asp:LinkButton ID="lnk_rev" runat="server">Review</asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>
</Columns>
<FooterStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
<HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="White"
HorizontalAlign="Left" />
<PagerStyle BackColor="#FFCC66" ForeColor="#333333" HorizontalAlign="Center" />
<RowStyle BackColor="#FFFBD6" ForeColor="#333333" />
<SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="Navy" />
</asp:GridView>
我需要在“lnk_rev”点击时弹出 div。
$("#lnk_file").live("click", function () { $("#modal").dialog({ title: "jQuery Modal Dialog Popup", buttons: { Close: function () { $(this ).dialog('close'); } }, modal: true }); return false; });