日期:2014-05-16  浏览次数:20336 次

js随意写的一个tab选项卡,VS中调试各种问题
前台aspx代码:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Manage.aspx.cs" Inherits="Manage_Manage" %>
<script language="javascript" src="../Js/iframe.js"  type="text/javascript"></script>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
    <form id="form1" runat="server">
    <table style="border-width: 0.5px; border-style: groove; width:100%; height:auto">
        <tr>
            <td style="width:200px;text-align:left; vertical-align:top">
                <div id="noticediv" style="background-color: #666666;border-color: #C0C0C0; border-width: 1px; height:50px; border-top-style: groove; border-bottom-style: groove; border-left-style: groove;text-align:center; padding-top:16px; color:White;" 
                    onclick='tabclick(["noticediv","userdiv","setdiv"],0);'>公&nbsp; 告</div>
                <div id="userdiv" style="background-color: #666666;border-color: #C0C0C0; border-width: 1px; height:50px; border-top-style: groove; border-bottom-style: groove; border-left-style: groove;text-align:center;padding-top:16px; color:White;"
                    onclick='tabclick(["noticediv","userdiv","setdiv"],1);'>用&nbsp; 户</div>
                <div id="setdiv" style="background-color: #666666;border-color: #C0C0C0; border-width: 1px; height:50px; border-top-style: groove; border-bottom-style: groove; border-left-style: groove; text-align:center;padding-top:16px; color:White;"
                    onclick='tabclick(["noticediv","userdiv","setdiv"],2);'>设&nbsp; 定</div>
            </td>
            <td style="min-height:300px; text-align:left; vertical-align:top; height:100%">
                <iframe id="showframe" scrolling="auto" onload='autoframe("showframe");' frameborder="0" marginheight="0" marginwidth="0" width="100%" height="100%" src=""></iframe>
            </td>
        </tr>
    </table>
    </form>
</body>
</html>



调用的js中:
function tabclick(tabs,&