12

特色导航

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="test.aspx.cs" Inherits="Admin_test" %>

<!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>
    <style type="text/css">
        body
        {
         margin:0px;
         padding:0px;

         }
        .style1
        {
            width: 18%;
        }
         .parent
        {
         font-size :11pt;
         width :179px;
         height :23px;
         border-style:none;
         background-image : url(../image/danhang1.gif);
            cursor :hand ;
        }
        .child
        {
        font-size :10pt;
        color:Red;
        height:23px;
        display :none;
        text-decoration:none;
        background-image :url(../image/daohang3.gif);
        border-bottom-color :Green ;
       border-bottom-style:ridge ;
        }
    </style>
 <script type="text/javascript">
  function clik(id)
  {
  var oj=document.getElementById(id);
var pr="p"+id;
var obj=document.getElementById (pr);
         if(oj.style.display=="none")
        {  var i;
          for(i=1;i<5;i++)
          {
             var yu="p"+i;
             var yug=document.getElementById(i);
             var yugang=document.getElementById(yu);
              yug.style.display="none";
          }
     obj.style.backgroundImage   =   "url(../image/danhang2.gif)";  
        oj.style.display="block";
      
        }
     else{
           oj.style.display="none";
            obj.style.backgroundImage =  "url(../image/danhang1.gif)"; 
     }
  }
 </script>
</head>
<body>
    <form id="form1" runat="server">
    <div id="test">
       <table border="0" cellpadding="0" cellspacing="0">
        <tr><td  align="center"class ="parent "id="p1" onclick ="clik(1)">设置1</td></tr>
        <tr id ="1" class ="child "style="display:none">
            <td>
                <table border="0" cellpadding="0" cellspacing="0">
                    <tr><td height="25px">1</td></tr><tr><td height="25px">2</td></tr>
                </table>
            </td>  
        </tr> 
         <tr><td  align="center"class ="parent "id="p2" onclick ="clik(2)">设置2</td></tr>
        <tr id ="2" class ="child "style="display:none">
            <td>
                <table border="0" cellpadding="0" cellspacing="0">
                    <tr><td height="25px">1</td></tr><tr><td height="25px">2</td></tr>
                </table>
            </td>  
        </tr>  
         <tr><td  align="center"class ="parent "id="p3" onclick ="clik(3)">设置3</td></tr>
        <tr id ="3" class ="child "style="display:none">
            <td>
                <table border="0" cellpadding="0" cellspacing="0">
                    <tr><td height="25px">1</td></tr><tr><td height="25px">2</td></tr>
                </table>
            </td>  
        </tr>  
         <tr><td  align="center"class ="parent "id="p4" onclick ="clik(4)">设置4</td></tr>
        <tr id ="4" class ="child "style="display:none">
            <td>
                <table border="0" cellpadding="0" cellspacing="0">
                    <tr><td height="25px">1</td></tr><tr><td height="25px">2</td></tr>
                </table>
            </td>  
        </tr>   
       </table>
     </div>
</form>
</body>
</html>

posted @ 2008-10-16 03:32  ygang  阅读(255)  评论(0编辑  收藏  举报
12