<asp:TabContainer ID="tcMain" runat="server" ActiveTabIndex="0" Width="986px">
<asp:TabPanel ID="tp1" HeaderText="H1" runat="server">
</asp:TabPanel>
<asp:TabPanel ID="tp2" HeaderText="H2" runat="server">
</asp:TabPanel>
</asp:TabContainer>
$(document).ready(function () {
$("#tp2").click(function () {
alert("Done");
});
});
在上面的代码中,当点击 TabPanel“tp2”时,应该会出现警告消息