<!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>

    <script language="javascript" type="text/javascript">
      lastDiv   =   'Basic'; 
    
     function   ShowDiv(id){          
          current   =   id; 
          if(lastDiv   &&   lastDiv   !=   current)  
                    document.getElementById(lastDiv).style.display   =   'none';  
          document.getElementById(current).style.display   =   'block';  
          lastDiv   =   current;  
 
    }

    </script>

</head>
<body>
        <div>
            <table>
                <tr>
                    <td onclick="ShowDiv('Basic')">
                        1</td>
                    <td onclick="ShowDiv('bbb')">
                        2</td>
                    <td onclick="ShowDiv('ccc')">
                        3</td>
                    <td onclick="ShowDiv('ddd')">
                        4</td>
                </tr>
            </table>
           
            <div >44444444444444444444444</div>
        </div>
</body>
</html>

 

相关文章: