超高难度框架问题之最佳解决方案

    技术2022-05-11  52

    真的很难吗???不难.之所以花了我一天的时间,主要原因,还是对框架及JS不了解.不然也不会这么痛苦.

    这是一个不知道怎么说的问题.还是直接发代码吧,到时候看看.

    一个default.htm中有4个iframe,代码如下

    default.htm

    <html xmlns="http://www.w3.org/1999/xhtml"> <head>  <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />  <title>e网在线办公系统</title>  <link href="img/style.css" rel="stylesheet" type="text/css" /> </head> <body>  <form id="Form1" method="post" runat="server">   <table width="1000" border="0" align="center" cellpadding="0" cellspacing="0">    <tr>     <td height="130" background="img/04.jpg"><iframe id="Top" width="100%" height="130" scrolling="no" frameborder="1" src="Top.htm" />     </td>    </tr>   </table>   <table width="1000" border="0" align="center" cellpadding="0" cellspacing="0">    <tr>     <td width="180" height="460" valign="top" background="img/03.jpg" bgcolor="#DFE5F5"><iframe id="Left" width="180" height="460" scrolling="no" frameborder="1" src="Left.htm" />     </td>     <td width="820" height="460" valign="top" bgcolor="#DFE5F5"><iframe id="Main" width="820" height="460" scrolling="yes" frameborder="1" src="RightLogin.htm" />     </td>    </tr>   </table>   <table width="1000" border="0" align="center" cellpadding="0" cellspacing="0">    <tr>     <td height="30" align="center" background="img/05.jpg"><iframe id="Foot" width="100%" height="30" scrolling="no" frameborder="1" src="Foot.htm" />     </td>    </tr>   </table>  </form> </body></html>

     Top,Left,Main都无所谓,空的都可以.主要是Foot.htm

    Foot.htm

    <html xmlns="http://www.w3.org/1999/xhtml"> <head>  <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />  <title>OA</title>

    <script language="javascript">

    function a(){top.window.document.getElementById('Main').src = 'http://www.baidu.com'}</script>    <script language="javascript">  var oPopup = window.createPopup();var popTop=50;

    function popmsg(msgstr){var winstr="<table style=/"border: 1 solid  #6D93C8/"  width=/"241/" height=/"172/" border=/"0/" cellpadding=/"0/" cellspacing=/"0/"   >";winstr+="<tr><td height=/"30/"> </td></tr><tr><td align=/"center/"><table width=/"90%/" height=/"110/" border=/"0/" cellpadding=/"0/" cellspacing=/"0/">";winstr+="<tr><td valign=/"top/" style=/"font-size:12px; color: #6D93C8; face: Tahoma/">"+msgstr+"</td></tr></table></td></tr></table>";oPopup.document.body.innerHTML = winstr;popshow();}

    function popshow(){window.status=popTop;

    if(popTop>1720){ popTop=50; clearTimeout(mytime); oPopup.hide(); return;}else if(popTop>1520&&popTop<1720 ){ if (oPopup.isOpen==true) {  oPopup.show(screen.width-250,screen.height,241,1720-popTop); }}else if(popTop>1500&&popTop<1520 ){ if (oPopup.isOpen==true) {  oPopup.show(screen.width-250,screen.height+(popTop-1720),241,172); }}else if(popTop<180 ){

      oPopup.show(screen.width-250,screen.height,241,popTop);}else if(popTop<220 ){  oPopup.show(screen.width-250,screen.height-popTop,241,172);}popTop+=10;var mytime=setTimeout("popshow();",50);}

    popmsg("<a οnclick='parent.a()'>点这些文字,让框架为Main的页面进行跳转</a>");  </script>   </head> <body  MS_POSITIONING="GridLayout">这是Foot </body></html>

    明白了吧..让框架为Main的页面进行跳转


    最新回复(0)