看看这个例子,把它放在你的框架里面,但要5.5以上的IE才能显示~!<html>
<head>
<title>Four Exciting Ways to Use the Popup Object</title><script>
var oPopup = window.createPopup();function richDropDown(order)
{
oPopup.document.body.innerHTML = document.all("oContextHTML" + order).innerHTML;
switch(order)
{
case 1:
oPopup.show(0, 28, 200, 125, dropdowno);
break;
case 2:
oPopup.show(205, 28, 200, 125, dropdowno);
break;
case 3:
oPopup.show(410, 28, 200, 125, dropdowno);
break;
}}
function hideMenu()
{
oPopup.hide();
}</script>
</head>
<body>
<h2>Four Exciting Uses of the Popup Object</h2><BR>
<table width="100%">
<tr><td width="200" height="27" id="dropdowno" align="left" style="background:#3366CC; border-bottom:1px solid #99CCFF; border-top:1px solid #99CCFF; font:bold 10pt tahoma; color:white; width:200px">
<span style="cursor:hand;" onmouseover="richDropDown(1)" ONCLICK="parent.window.open('http://msdn.microsoft.com')">
Click here <img src="UI_droparrow.gif" align="absmiddle" style=""></span></td>
<td width="200" height="27" id="dropdowna" align="left" style="background:#3366CC; border-bottom:1px solid #99CCFF; border-top:1px solid #99CCFF; font:bold 10pt tahoma; color:white; width:200px" ><span style="cursor:hand; " onmouseover="richDropDown(2)" ONCLICK="top.mainFrame.location.href='http://search.microsoft.com'">The second <img src="UI_droparrow.gif" align="absmiddle" style=""></span>
</td>
<td width="200" height="27" id="dropdownb" align="left" style="background:#3366CC; border-bottom:1px solid #99CCFF; border-top:1px solid #99CCFF; font:bold 10pt tahoma; color:white; width:200px" ><span style="cursor:hand; " onmouseover="richDropDown(3)" ONCLICK="top.location.href='http://search.microsoft.com'">The third <img src="UI_droparrow.gif" align="absmiddle" style=""></span>
</td>
<td></td>
</tr>
</table>
<BR><br>
<br>
<br>
<head>
<title>Four Exciting Ways to Use the Popup Object</title><script>
var oPopup = window.createPopup();function richDropDown(order)
{
oPopup.document.body.innerHTML = document.all("oContextHTML" + order).innerHTML;
switch(order)
{
case 1:
oPopup.show(0, 28, 200, 125, dropdowno);
break;
case 2:
oPopup.show(205, 28, 200, 125, dropdowno);
break;
case 3:
oPopup.show(410, 28, 200, 125, dropdowno);
break;
}}
function hideMenu()
{
oPopup.hide();
}</script>
</head>
<body>
<h2>Four Exciting Uses of the Popup Object</h2><BR>
<table width="100%">
<tr><td width="200" height="27" id="dropdowno" align="left" style="background:#3366CC; border-bottom:1px solid #99CCFF; border-top:1px solid #99CCFF; font:bold 10pt tahoma; color:white; width:200px">
<span style="cursor:hand;" onmouseover="richDropDown(1)" ONCLICK="parent.window.open('http://msdn.microsoft.com')">
Click here <img src="UI_droparrow.gif" align="absmiddle" style=""></span></td>
<td width="200" height="27" id="dropdowna" align="left" style="background:#3366CC; border-bottom:1px solid #99CCFF; border-top:1px solid #99CCFF; font:bold 10pt tahoma; color:white; width:200px" ><span style="cursor:hand; " onmouseover="richDropDown(2)" ONCLICK="top.mainFrame.location.href='http://search.microsoft.com'">The second <img src="UI_droparrow.gif" align="absmiddle" style=""></span>
</td>
<td width="200" height="27" id="dropdownb" align="left" style="background:#3366CC; border-bottom:1px solid #99CCFF; border-top:1px solid #99CCFF; font:bold 10pt tahoma; color:white; width:200px" ><span style="cursor:hand; " onmouseover="richDropDown(3)" ONCLICK="top.location.href='http://search.microsoft.com'">The third <img src="UI_droparrow.gif" align="absmiddle" style=""></span>
</td>
<td></td>
</tr>
</table>
<BR><br>
<br>
<br>
<tr><td style="position:absolute; top:0; left:0; overflow-x:hidden; width:200; height:100;scrollbar-base-color:#3366CC; border-bottom:2px solid black; SCROLLBAR-HIGHLIGHT-COLOR: #99CCFF; SCROLLBAR-ARROW-COLOR: white;">
<DIV onmouseover="this.style.filter='progid:DXImageTransform.Microsoft.Gradient(GradientType=0, StartColorStr=#99ccff, EndColorStr=#FFFFFF)';"
onmouseout="this.style.filter='';"
STYLE="font-family:verdana; font-size:70%; height:25px; background:#e4e4e4; border:1px solid black; padding:3px; padding-left:20px; cursor:hand; filter:;">
<SPAN ONCLICK="top.mainFrame.location.href='http://search.microsoft.com'">
Custom Drop-Down Item 1</SPAN>
</DIV>
</td></tr>
<tr><td>
<DIV onmouseover="this.style.filter='progid:DXImageTransform.Microsoft.Gradient(GradientType=0, StartColorStr=yellowgreen, EndColorStr=#FFFFFF)';"
onmouseout="this.style.filter='';"
STYLE="font-family:verdana; font-size:70%; height:25px; background:#e4e4e4; border:1px solid black; padding:3px; padding-left:20px; cursor:hand; border-top:0px solid black">
<SPAN ONCLICK="parent.window.open('http://msdn.microsoft.com')">
Custom New Blank Page</SPAN>
</DIV>
</td></tr>
<tr><td>
<DIV onmouseover="this.style.filter='progid:DXImageTransform.Microsoft.Gradient(GradientType=0, StartColorStr=gold, EndColorStr=#FFFFFF)';"
onmouseout="this.style.filter='';"
STYLE="font-family:verdana; font-size:70%; height:25px; background:#e4e4e4; border:1px solid black; padding:3px; padding-left:20px; cursor:hand; border-top:0px solid black">
<SPAN ONCLICK="top.location.href='http://search.microsoft.com'">
Custom Drop-Down Item 3</SPAN>
</DIV>
</td></tr>
<tr><td>
<DIV onmouseover="this.style.filter='progid:DXImageTransform.Microsoft.Gradient(GradientType=0, StartColorStr=violet, EndColorStr=#FFFFFF)';"
onmouseout="this.style.filter='';"
STYLE="font-family:verdana; font-size:70%; height:25px; background:#e4e4e4; border:1px solid black; padding:3px; padding-left:20px; cursor:hand; border-top:0px solid black">
<SPAN ONCLICK="parent.location.href='http://search.microsoft.com'">
Custom Drop-Down Item 4</SPAN>
</DIV>
</td></tr>
<tr><td>
<DIV onmouseover="this.style.filter='progid:DXImageTransform.Microsoft.Gradient(GradientType=0, StartColorStr=#99ccff, EndColorStr=#FFFFFF)';"
onmouseout="this.style.filter='';"
STYLE="font-family:verdana; font-size:70%; height:25px; background:#e4e4e4; border:1px solid black; padding:3px; padding-left:20px; cursor:hand; border-top:0px solid black">
<SPAN ONCLICK="parent.location.href='http://search.microsoft.com'">
Custom Drop-Down Item 5</SPAN>
</DIV>
</td></tr>
</table>
<div style="position:absolute; top:0; left:0; overflow-x:hidden; width:200; height:100;scrollbar-base-color:#3366CC; border-bottom:2px solid black; SCROLLBAR-HIGHLIGHT-COLOR: #99CCFF; SCROLLBAR-ARROW-COLOR: white;">
<DIV onmouseover="this.style.filter='progid:DXImageTransform.Microsoft.Gradient(GradientType=0, StartColorStr=#99ccff, EndColorStr=#FFFFFF)';"
onmouseout="this.style.filter='';"
STYLE="font-family:verdana; font-size:70%; height:25px; background:#e4e4e4; border:1px solid black; padding:3px; padding-left:20px; cursor:hand; filter:;">
<SPAN ONCLICK="parent.location.href='http://msdn.microsoft.com'">
Anthoer Drop-Down Item 1</SPAN>
</DIV>
<DIV onmouseover="this.style.filter='progid:DXImageTransform.Microsoft.Gradient(GradientType=0, StartColorStr=yellowgreen, EndColorStr=#FFFFFF)';"
onmouseout="this.style.filter='';"
STYLE="font-family:verdana; font-size:70%; height:25px; background:#e4e4e4; border:1px solid black; padding:3px; padding-left:20px; cursor:hand; border-top:0px solid black">
<SPAN ONCLICK="parent.location.href='http://search.microsoft.com'">
Anthoer Drop-Down Item 2</SPAN>
</DIV>
<DIV onmouseover="this.style.filter='progid:DXImageTransform.Microsoft.Gradient(GradientType=0, StartColorStr=gold, EndColorStr=#FFFFFF)';"
onmouseout="this.style.filter='';"
STYLE="font-family:verdana; font-size:70%; height:25px; background:#e4e4e4; border:1px solid black; padding:3px; padding-left:20px; cursor:hand; border-top:0px solid black">
<SPAN ONCLICK="parent.location.href='http://search.microsoft.com'">
Anthoer Drop-Down Item 3</SPAN>
</DIV>
<DIV onmouseover="this.style.filter='progid:DXImageTransform.Microsoft.Gradient(GradientType=0, StartColorStr=violet, EndColorStr=#FFFFFF)';"
onmouseout="this.style.filter='';"
STYLE="font-family:verdana; font-size:70%; height:25px; background:#e4e4e4; border:1px solid black; padding:3px; padding-left:20px; cursor:hand; border-top:0px solid black">
<SPAN ONCLICK="parent.location.href='http://search.microsoft.com'">
Anthoer Drop-Down Item 4</SPAN>
</DIV>
<DIV onmouseover="this.style.filter='progid:DXImageTransform.Microsoft.Gradient(GradientType=0, StartColorStr=#99ccff, EndColorStr=#FFFFFF)';"
onmouseout="this.style.filter='';"
STYLE="font-family:verdana; font-size:70%; height:25px; background:#e4e4e4; border:1px solid black; padding:3px; padding-left:20px; cursor:hand; border-top:0px solid black">
<SPAN ONCLICK="parent.location.href='http://search.microsoft.com'">
Anthoer Drop-Down Item 5</SPAN>
</DIV>
</div>
</DIV>
<DIV ID="oContextHTML3" STYLE="display:none;">
<div style="position:absolute; top:0; left:0; overflow-x:hidden; width:200; height:100;scrollbar-base-color:#3366CC; border-bottom:2px solid black; SCROLLBAR-HIGHLIGHT-COLOR: #99CCFF; SCROLLBAR-ARROW-COLOR: white;">
<DIV onmouseover="this.style.filter='progid:DXImageTransform.Microsoft.Gradient(GradientType=0, StartColorStr=#99ccff, EndColorStr=#FFFFFF)';"
onmouseout="this.style.filter='';"
STYLE="font-family:verdana; font-size:70%; height:25px; background:#e4e4e4; border:1px solid black; padding:3px; padding-left:20px; cursor:hand; filter:;">
<SPAN ONCLICK="parent.location.href='http://msdn.microsoft.com'">
Third Drop-Down Item 1</SPAN>
</DIV>
<DIV onmouseover="this.style.filter='progid:DXImageTransform.Microsoft.Gradient(GradientType=0, StartColorStr=yellowgreen, EndColorStr=#FFFFFF)';"
onmouseout="this.style.filter='';"
STYLE="font-family:verdana; font-size:70%; height:25px; background:#e4e4e4; border:1px solid black; padding:3px; padding-left:20px; cursor:hand; border-top:0px solid black">
<SPAN ONCLICK="parent.location.href='http://search.microsoft.com'">
Third Drop-Down Item 2</SPAN>
</DIV>
<DIV onmouseover="this.style.filter='progid:DXImageTransform.Microsoft.Gradient(GradientType=0, StartColorStr=gold, EndColorStr=#FFFFFF)';"
onmouseout="this.style.filter='';"
STYLE="font-family:verdana; font-size:70%; height:25px; background:#e4e4e4; border:1px solid black; padding:3px; padding-left:20px; cursor:hand; border-top:0px solid black">
<SPAN ONCLICK="parent.location.href='http://search.microsoft.com'">
Third Drop-Down Item 3</SPAN>
</DIV>
<DIV onmouseover="this.style.filter='progid:DXImageTransform.Microsoft.Gradient(GradientType=0, StartColorStr=violet, EndColorStr=#FFFFFF)';"
onmouseout="this.style.filter='';"
STYLE="font-family:verdana; font-size:70%; height:25px; background:#e4e4e4; border:1px solid black; padding:3px; padding-left:20px; cursor:hand; border-top:0px solid black">
<SPAN ONCLICK="parent.location.href='http://search.microsoft.com'">
Third Drop-Down Item 4</SPAN>
</DIV>
<DIV onmouseover="this.style.filter='progid:DXImageTransform.Microsoft.Gradient(GradientType=0, StartColorStr=#99ccff, EndColorStr=#FFFFFF)';"
onmouseout="this.style.filter='';"
STYLE="font-family:verdana; font-size:70%; height:25px; background:#e4e4e4; border:1px solid black; padding:3px; padding-left:20px; cursor:hand; border-top:0px solid black">
<SPAN ONCLICK="parent.location.href='http://search.microsoft.com'">
Third Drop-Down Item 5</SPAN>
</DIV>
</div>
</DIV></body>
</html>