web框架技术 内容页调用 左边菜单页面 函数

框架页面代码:

<%@ Page language="c#" Inherits="fx_new._default" CodeFile="default.aspx.cs" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
 <HEAD>
  <TITLE>信息管理系统</TITLE>
  <meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1">
  <meta name="CODE_LANGUAGE" Content="C#">
  <meta name="vs_defaultClientScript" content="JavaScript">
  <meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
 </HEAD>
 <frameset rows="125,78%,0" border="0" bordercolor="#ffffcc" frameborder="0" runat="server"
  frameSpacing="0" ID="Frameset1">
  <frame name="header" scrolling="no" noresize src="">
  <frameset id="search" cols="124,*" frameborder="0" framespacing="0">
   <frame name="contents" src="top.html" scrolling="yes">
   <frame name="fx_main" src="button.html" scrolling="yes" style="OVERFLOW: auto">
  </frameset>
  <frame name="bottom"    scrolling="no" noresize src="message_xt.aspx">
 </frameset>
</HTML>

菜单页面代码: (top.html  名称不规范 临时起的)

<!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 getFXD() {
            document.getElementById("aaa").innerHTML = "999";
        }
    </script>
</head>
<body>
    <input id="Button1" type="button" value="top" />
    <input id="Button2" type="button" value="button" onclick="getFXD();" />
    <div id="aaa">
    </div>
</body>
</html>

内容页面代码:(button.html  名称不规范 临时起的)

<!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>
</head>
<body>
    <input id="Button1" type="button" onclick="window.parent.contents.document.all.aaa.innerHTML= '88888';"
        value="bbb" />
    <input id="Button2" type="button" onclick="window.parent.contents.您的menu页面js函数() ;"
        value="b2" />
</body>
</html>

posted @ 2011-06-23 13:18  郑文亮  阅读(351)  评论(0编辑  收藏  举报