我用的是<frameset>划分网页的,其中我设一个<fram>的ID为"main", 我用imagebutton作为一个超链接按件.转向指定到id为"main"的<frame>页面内.怎么实现,当然这个imagebutton不是在id为"main"的<frame>内的,,谢谢

解决方案 »

  1.   

    用<a>标签即可
    <a href="XX" target='main' >XXX</a>
      

  2.   

    如果外部 直接跳转该页面的URL如果内部
    需指定 URL的target页面布局 参考<!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>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>这些是可可写的代码</title>
    </head>
    <frameset rows="132px,*" height="100%" frameborder="0" framespacing="0" > 
       <frame name="top" src="top.html" frameborder="0" name="top" scrolling="no" ><frameset cols="235px,*" height="100%" frameborder="0" framespacing="0"><frame name="left" src="left.html" frameborder="0" name="top" scrolling="auto" noresize="noresize" margwidth="0" margheight="0"><frame name="right" src="2.html" frameborder="0" name="top" scrolling="yes" noresize="noresize" ></frameset>
    </frameset></html>
      

  3.   


    我用的这个<a href="msg.aspx" target="main"><asp:ImageButton ID="IgBtsx1" runat="server" ImageUrl="~/image/sx.jpg" 
                                    Height="28px" Width="86px"/></a>,实现不了.
      

  4.   


    lmagebutton不能使用Target啊,
      

  5.   

    protected   void   ImageBT_Click(object   sender,   ImageClickEventArgs   e) 

    string   strHyperPath; 
    strHyperPath   =   "document.frames[ ''].document.location   = 'a.aspx'; "; 
    Response.Write( " <script> "   +   strHyperPath   +   " </script> "); 
      

  6.   


    出现这个错误提示
    行: 1
    错误: 'document.frames.main.document' 为空或不是对象
      

  7.   

    imagebutton 待跳转的页面内 form加上target=“main”属性
      

  8.   

    换句话说哪个页面要在main中显示,就在哪个页面的form中加上属性target=“main”