<script>
var p=0
function switchSysBar(){
if (p==0){
switchPoint.innerHTML="&gt;"
document.all("frmTitle").style.display="none"
p=1
}
else{
switchPoint.innerHTML="&lt;"
document.all("frmTitle").style.display=""
p=0
}
}
</script>
</head>
<body style="MARGIN: 0px" scroll=no>
<table border="0" cellspacing="0" cellpadding="0" width="100%" height="100%">
 <tr>
  <td id="frmTitle" name="frmTitle" nowrap valign="middle" align="center" width="180">
   <IFRAME id="BoardTitle" name="main" style="HEIGHT: 100%; VISIBILITY: inherit; WIDTH: 180; Z-INDEX: 2" scrolling="no" frameborder="0" src="FuncBar.asp"></IFRAME>
  <td style="width:10pt" bgcolor="#ffcc11">
     <table cellspacing="0" cellpadding="0" border="0" height="100%">
    <tr>
     <td style="height:100%" onClick="switchSysBar()">
     <span id="switchPoint" title="0112121" bgcolor=red>&lt;</font></span>
   </table>
  </td>
  <td style="width:100%">
 <IFRAME id="frmright" name="BoardList" style="HEIGHT: 100%; VISIBILITY: inherit; WIDTH: 100%; Z-INDEX: 1" scrolling="auto" frameborder="0" src="main.asp"></IFRAME>
 </tr>
</table>

解决方案 »

  1.   

    因为vs.net2005中使用的是XHTML 1.0,所以上面那段html有挺多的错误,不知道为什么总是改不对,帮看看,好吗?谢谢
      

  2.   

    现在已经改好了,没什么错误了!!
    可是我在iframe里面放表格为什么不行呢!?
    谢谢
      

  3.   

    我以前写的一个,你可以改改<!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>
        <title>无标题页</title>
        <script type="text/javascript">
            function $(elementId)
            {
                return document.getElementById(elementId);
            }
        </script>
    </head>
    <body>
        <table>
            <tr>
                <td id="leftTd" style="width: 300px; height: 21px; background-color: #ff0000;">
                </td>
                <td style="width: 30px; height: 21px">
                    <input id="Button1" type="button" value="向左走,向右走" onclick="buttonClick()" /></td>
                <td id="rightTd" style="width: 300px; height: 21px; background-color: #0000ff;">
                </td>
            </tr>
        </table></body>
    </html>
    <script type="text/javascript">
        var leftTd = $("leftTd");
        var rightTd = $("rightTd");
        var Button2 = $("Button2");
        var plusTd = rightTd;
        var subTd = leftTd;
        var leftOrRight = true;     //  true is left, flase is right
        var timer = false;
        var offset = 1;
        
        //  按钮的单击处理事件
        function buttonClick()
        {
            //  根据不同的状态值来设定加和减对象
            if(leftOrRight)
            {
                plusTd = rightTd;
                subTd = leftTd;
            }
            else
            {
                plusTd = leftTd;
                subTd = rightTd;
            }
            
            offset = 0.1;
            
            //  启动定时期,开始移动
            timer = window.setTimeout(move,10);
        }
        
        //  移动
        function move()
        {
            //  取得减少一方现在的宽度
            var width = parseInt(subTd.style.width);
            
            //  判断是否继续移动
            if(width > 0)
            {
                //  继续移动
                
                //  取得要位移的差值
                offset = offset + offset/5;
                if(offset > width) offset = width;
                
                var offsetNow = Math.ceil(offset);
                
                //  位移
                subTd.style.width = parseInt(subTd.style.width) - offsetNow;
                plusTd.style.width = parseInt(plusTd.style.width) + offsetNow;
                
                //  继续移动
                timer = window.setTimeout(move,10);
            }
            else
            {
                leftOrRight = !leftOrRight;
            }
        }
        
        //  
    </script>
      

  4.   

    写了一个简单的,应该比较适合你。
    <script>
    function s()
    {
        if(h.style.display!="none")
        {
        h.style.display="none";
        info.innerHTML="6";
        h.style.left=200;
        
        }
        else
        {
        h.style.display="";
        info.innerHTML="9";
        }
    }</script>
    <table width="100%">
    <tr>
    <td bgcolor="red">
    <a href="javascript:s()">点这里</a>
    <div onClick="s()" id="info" style="CURSOR:hand;position:absolute">ffff</div>
    </td>
    <td width="220" bgcolor="#000000" id="h"></td>
    </tr>
    </table>
      

  5.   

    我刚刚做好一个,需要的话,给我留言,我把文件发给你,[email protected]
      

  6.   

    你好:
    非常感谢你回复我的帖子,我想需要一份,请发给我好吗?谢谢。我帖子的地址:
    http://community.csdn.net/Expert/topic/4874/4874735.xml?temp=.2125513
      

  7.   

    function switchSysBar(){
      if (switchPoint.innerText==3){
          switchPoint.innerText=4
          document.all("frmTitle").style.display="none"
      }else{
          switchPoint.innerText=3
          document.all("frmTitle").style.display=""
      }
    }
    <table border="0" cellPadding="0" cellSpacing="0" height="100%" width="100%">
      <tr>
        <td align="middle" noWrap vAlign="center" id="frmTitle">    
        <iframe frameBorder="0" id="carnoc" name="carnoc" scrolling="no" src="left.asp" style="HEIGHT: 100%; VISIBILITY: inherit; WIDTH: 170px; Z-INDEX: 2">
        </iframe>
        </td>
        <td style="WIDTH: 9pt" class=a2>
        <table border="0" cellPadding="0" cellSpacing="0" height="100%">
          <tr>
            <td style="HEIGHT: 100%" onclick="switchSysBar()">
            <font style="FONT-SIZE: 9pt; CURSOR: default; COLOR: #ffffff">
            <br>
            <br>
            <br>
            <br>
            <br>
            <br>
            <br>
            <br>
            <br>
            <br>
            <br>
            <br>
            <br>
            <span class="navPoint" id="switchPoint" title="关闭/打开左栏">3</span><br>
            <br>
            <br>
            <br>
            <br>
            <br>
            <br>
            <br>
            屏幕切换 </font></td>
          </tr>
        </table>
        </td>
        <td style="WIDTH: 100%">
        <iframe frameBorder="0" id="main" name="main" scrolling="yes" src="Default.asp" style="HEIGHT: 100%; VISIBILITY: inherit; WIDTH: 100%; Z-INDEX: 1">
        </iframe>    </td>
      </tr>
    </table>
      

  8.   

    呵呵,我也是新手,刚开始用VS.2005,楼主想问的也是我想问的,我也希望能解决这个问题,借楼主的地盘恳求高人指点,以上前三个代码在记事本中编译都能通过,而到2005里只有第二个可以显示出,但我想嵌入到自己的程序里就是不能通过,还有,我刚来这里不会发帖子也不知道积分有什么用,顺便再问个问题,2005中怎么把masterPage模版嵌入到.aspx页面里,使运行的时候显示masterPage页内容,希望楼主也指点下,我新手,感恩不尽!!
      

  9.   

    zzz22333() :
    新建一母版页MasterPage.master,做好你的布局后,在新建一aspx页test.aspx,在test.aspx中的代码如下:
    <%@ Page Language="VB" MasterPageFile="~/MasterPage.master" AutoEventWireup="false" CodeFile="test.aspx.vb" Inherits="test" title="Untitled Page" %>
    <asp:Content ID="Content1" ContentPlaceHolderID="cphHead" Runat="Server">
        &nbsp;
    </asp:Content>
    <asp:Content ID="Content2" ContentPlaceHolderID="cphLeft" Runat="Server">
    </asp:Content>
    <asp:Content ID="Content3" ContentPlaceHolderID="chpMain" Runat="Server">
    </asp:Content>
      

  10.   

    我把整个页面内容发上吧,我这里在IE下测试完全没问题
    <html><head>
    <meta name="GENERATOR" content="Microsoft FrontPage 6.0">
    <meta name="ProgId" content="FrontPage.Editor.Document">
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    <title>3&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 屏幕切换</title>
    <script language="javascript">
    function switchSysBar(){
      if (switchPoint.innerText==3){
          switchPoint.innerText=4
          document.all("frmTitle").style.display="none"
      }else{
          switchPoint.innerText=3
          document.all("frmTitle").style.display=""
      }
    }
    </script>
    </head><body><table border="0" cellPadding="0" cellSpacing="0" height="100%" width="100%">
      <tr>
        <td align="middle" noWrap vAlign="center" id="frmTitle">    
        <iframe frameBorder="0" id="carnoc" name="carnoc" scrolling="no" src="left.htm" style="HEIGHT: 100%; VISIBILITY: inherit; WIDTH: 170px; Z-INDEX: 2">
        </iframe>
        </td>
        <td style="WIDTH: 9pt" class=a2>
        <table border="0" cellPadding="0" cellSpacing="0" height="100%">
          <tr>
            <td style="HEIGHT: 100%" onclick="switchSysBar()">
            <font style="FONT-SIZE: 9pt; CURSOR: default; COLOR: #ffffff">
            <br/>
            <br/>
            <br/>
            <br/>
            <br/>
            <br/>
            <br/>
            <br/>
            <br/>
            <br/>
            <br/>
            <br/>
            <br/>
            <span class="navPoint" id="switchPoint" title="关闭/打开左栏">3</span><br/>
            <br/>
            <br/>
            <br/>
            <br/>
            <br/>
            <br/>
            <br/>
            屏幕切换 </font></td>
          </tr>
        </table>
        </td>
        <td style="WIDTH: 100%">
        <iframe frameBorder="0" id="main" name="main" scrolling="yes" src="default.htm" style="HEIGHT: 100%; VISIBILITY: inherit; WIDTH: 100%; Z-INDEX: 1">
        </iframe>    </td>
      </tr>
    </table></body></html>