首页产品库评测行情新闻|手机数码笔记本台式机DIY硬件数字家庭数码相机办公外设|软件下载游戏开发|社区

更多

数码相机
MP4
LCD
机箱
音箱

软件资讯设计 工具 系统 开发 安全 办公 陶吧 IT教育 Windows 7 | 下载中心天极下载中心诚征下载通路合作伙伴
天极网 > 软件频道 > 网页陶吧>用DHTML中的Popup Object跨框架显示菜单

用DHTML中的Popup Object跨框架显示菜单

2006-08-18 11:08作者:网页陶吧出处:天极网责任编辑:龙犊

      先来看看frames.htm页面的源代码:

以下是引用片段:
<html>
<head>
<title>网页跨框架菜单 from MSDN</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head> 
<frameset rows="92,*" cols="*" framespacing="4" frameborder="yes" border="4">
  <frame src="top.htm" name="topFrame" scrolling="NO" >
  <frame src="bottom.htm" name="mainFrame">
</frameset>
<noframes><body>
</body></noframes>
</html>

     再来看看top.htm页面的源代码: 

以下是引用片段:
<html>
<head>
<title>MSDN的示例</title>
<script>
var oPopup = window.createPopup();
function richContext()
{
    var lefter2 = event.offsetY+0;
    var topper2 = event.offsetX+15;
    oPopup.document.body.innerHTML = oContext2.innerHTML; 
    oPopup.show(topper2, lefter2, 210, 84, contextobox);
}
</script>
</head>
<body>

<span id="contextobox" style="  cursor:hand; margin-left:5px; margin-right:10px; background:#e4e4e4; width:300; height:40; padding:20px;" oncontextmenu="richContext(); return false"  >Right-click inside this box.</span>
<DIV ID="oContext2" STYLE="display:none">
<DIV STYLE="position:relative; top:0; left:0; border:2px solid black;  border-top:2px solid #cccccc; border-left:2px solid #cccccc; background:#666666; height:110px; width:207px;"> 
  <DIV STYLE="position:relative; top:0; left:0; background:#cccccc; border:1px solid black; border-top: 1px solid white; border-left:1px solid white; height:20px; color:black; font-family:verdana; font-weight:bold; padding:2px; padding-left:10px; font-size:8pt; cursor:hand" onmouseover="this.style.background='#ffffff'" onmouseout="this.style.background='#cccccc'" onclick="parent.location.href='http://www.microsoft.com';"> 
    &nbsp;&nbsp;Home</DIV>
  <DIV STYLE="position:relative; top:0; left:0; background:#cccccc; border:1px solid black; border-top: 1px solid white; border-left:1px solid white; height:20px; color:black; font-family:verdana; font-weight:bold; padding:2px; padding-left:10px; font-size:8pt; cursor:hand" onmouseover="this.style.background='#ffffff'" onmouseout="this.style.background='#cccccc'" onclick="parent.location.href='http://search.microsoft.com';"> 
    &nbsp;&nbsp;Search</DIV>
  <DIV STYLE="position:relative; top:0; left:0; background:#cccccc; border:1px solid black; border-top: 1px solid white; border-left:1px solid white; height:20px; color:black; font-family:verdana; font-weight:bold; padding:2px; padding-left:10px; font-size:8pt; cursor:hand" onmouseover="this.style.background='#ffffff'" onmouseout="this.style.background='#cccccc'" onclick="parent.location.href='http://www.microsoft.com/ie';"> 
    &nbsp;&nbsp;Intenet Explorer</DIV>
  <DIV STYLE="position:relative; top:0; left:0; background:#cccccc; border:1px solid black; border-top: 1px solid white; border-left:1px solid white; height:20px; color:black; font-family:verdana; font-weight:bold; padding:2px; padding-left:10px; font-size:8pt; cursor:hand" onmouseover="this.style.background='#ffffff'" onmouseout="this.style.background='#cccccc'" onclick="parent.location.href='http://www.microsoft.com/info/cpyright.htm';"> 
    &#169;2001 Microsoft Corporation</DIV>
</DIV>
</body>
</html>
 

  注意:新版网页陶吧(http://homepage.yesky.com/)上线了

热卖推荐: 手机 诺基亚 MP5 电脑包 双卡双待 手机链 U盘 笔记本电脑

关注此文的读者还看过:

返回网页陶吧首页

共1页。 1
  • 1.用DHTML中的Popup Object跨框架显示菜单

软件频道最新更新

热点推荐

IT嘉年华

编辑推荐

软件下载

热门
推荐

网友关注

软件
资料
游戏

装机推荐

文章排行

本周
本月
最新更新
天极服务|关于我们|About us|网站律师|RSS订阅|友情合作|加入我们|天极动态|网站地图|意见反馈|MSN/QQ上看天极
Copyright (C) 1999-2012 Yesky.com, All Rights Reserved 版权所有 天极网络