<asp:TabPanel ID="TabPanel1" runat="server">
<HeaderTemplate>
<div width="100%" onmouseover="activeTab(0)" onclick="stopClickEvent(event)">
<img alt='' src="images/tf18.png"></div>
</HeaderTemplate>
<asp:TabPanel ID="TabPanel2" runat="server">
<HeaderTemplate>
<div width="100%" onmouseover="activeTab(1)" onclick="stopClickEvent(event)">
<img alt='' src="images/tf18.png"></div>
</HeaderTemplate>
---
<script type="text/javascript">
function stopClickEvent(evt) {
var e = (evt) ? evt : window.event;
if (window.event) {
e.cancelBubble = true; //ie
} else {
e.stopPropagation(); //Firefox
}
}
function activeTab(index) {
if (index !== $find("<%=TabContainer1.ClientID%>").get_activeTabIndex()) {
if (index == 0)
$find("<%=TabContainer1.ClientID%>").set_activeTab($find("<%=TabContainer1.Tabs[0].ClientID%>"));
else
$find("<%=TabContainer1.ClientID%>").set_activeTab($find("<%=TabContainer1.Tabs[1].ClientID%>"));
}
}
</script>
沒有留言:
張貼留言