<script type="text/javascript" src="/js/jquery-3.2.0.min.js"></script>
<script type="text/javascript">
//$(document).ready(function () {
// $("#showPwd").click(function () {
// if ($("#txtPwd").attr("type") == "text") {
// $("#txtPwd").attr("type", "password");
// $("#iconPwd").attr("class", "aui-iconfont aui-icon-hide");
// } else {
// $("#txtPwd").attr("type", "text");
// $("#iconPwd").attr("class", "aui-iconfont aui-icon-display");
// }
// });
//});
$(function () {
$('div.tab').click(function () {
var tabid = $(this).attr("id");
alert(tabid.substr(3))
eval("a" + tabid.substr(3) + "()");
});
});
function a1() { alert(11) };
function a2() { alert(22) };
function a3() { alert(33) };
function a4() { alert(44) };
function a5() { alert(55) };
</script>
<body>
<form id="form1" runat="server">
<div class="tab" id="tab1" style="width:1000px;height:300px;background-color:aqua">
<h3 class="tabtxt" title="苹果">
<asp:LinkButton ID="LinkButton1" runat="server">苹果</asp:LinkButton>
</h3>
</div>
<div class="tab" id="tab2">
<h3 class="tabtxt" title="鸭梨">
<asp:LinkButton ID="LinkButton2" runat="server" >鸭梨</asp:LinkButton></h3>
</div>
<div class="tab" id="tab3">
<h3 class="tabtxt" title="香蕉">
<asp:LinkButton ID="LinkButton3" runat="server" >香蕉</asp:LinkButton>
</h3>
</div>
<div class="tab" id="tab4">
<h3 class="tabtxt" title="杏">
<asp:LinkButton ID="LinkButton4" runat="server" >杏</asp:LinkButton>
</h3>
</div>
<div class="tab" id="tab5">
<h3 class="tabtxt" title="西红柿">
<asp:LinkButton ID="LinkButton5" runat="server" >西红柿</asp:LinkButton>
</h3>
</div>
</form>
</body>