代码:
<html>
<head>
<title>弹出播放</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<script language="javascript">
function ShowDiv(s)
{
if(s>0)
{
document.getElementById('ceng').style.display='block';
document.getElementById('close').style.display='block';
}else{
document.getElementById('ceng').style.display='none';
document.getElementById('close').style.display='none';
}
}
</script>
</head>
<body>
<a href="#" onclick="ShowDiv(1)">点击弹出</a>
<div id="ceng" style="position:absolute;z-index:2;left:0;top:0;right:0;background-color:#000;filter:alpha(opacity=50);margin:1px 1px;display:none;width:100%;height:100%;text-align:center;">
</div>
<div id="close" style="position:absolute !important;left:30%;top:0px;z-index:3;border:1px solid #ff6600;background-color:#fff;margin:100px auto;padding:0px;display:none;width:510px;height:440px;text-align:right">
<a href="#" onclick="ShowDiv(0)">关闭</a>
<div style="text-align:center;"><embed src="http://player.youku.com/player.php/Type/Folder/Fid/16724311/Ob/1/Pt/0/sid/XMzMxMTM4MTI4/v.swf" quality="high" width="480" height="400" align="middle" allowScriptAccess="always" allowFullScreen="true" mode="transparent" type="application/x-shockwave-flash"></embed></div>
</div>
</body>
</html>
<html>
<head>
<title>弹出播放</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<script language="javascript">
function ShowDiv(s)
{
if(s>0)
{
document.getElementById('ceng').style.display='block';
document.getElementById('close').style.display='block';
}else{
document.getElementById('ceng').style.display='none';
document.getElementById('close').style.display='none';
}
}
</script>
</head>
<body>
<a href="#" onclick="ShowDiv(1)">点击弹出</a>
<div id="ceng" style="position:absolute;z-index:2;left:0;top:0;right:0;background-color:#000;filter:alpha(opacity=50);margin:1px 1px;display:none;width:100%;height:100%;text-align:center;">
</div>
<div id="close" style="position:absolute !important;left:30%;top:0px;z-index:3;border:1px solid #ff6600;background-color:#fff;margin:100px auto;padding:0px;display:none;width:510px;height:440px;text-align:right">
<a href="#" onclick="ShowDiv(0)">关闭</a>
<div style="text-align:center;"><embed src="http://player.youku.com/player.php/Type/Folder/Fid/16724311/Ob/1/Pt/0/sid/XMzMxMTM4MTI4/v.swf" quality="high" width="480" height="400" align="middle" allowScriptAccess="always" allowFullScreen="true" mode="transparent" type="application/x-shockwave-flash"></embed></div>
</div>
</body>
</html>
<head>
<title>弹出播放</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<script language="javascript">
function ShowDiv(s)
{
if(s>0)
{
document.getElementById('ceng').style.display='block';
document.getElementById('close').style.display='block';
document.getElementById('close').innerHTML = '<a href="#" onclick="ShowDiv(0)">关闭</a><div style="text-align:center;"><embed src="http://player.youku.com/player.php/Type/Folder/Fid/16724311/Ob/1/Pt/0/sid/XMzMxMTM4MTI4/v.swf" quality="high" width="480" height="400" align="middle" allowScriptAccess="always" allowFullScreen="true" mode="transparent" type="application/x-shockwave-flash"></embed></div>'
}else{
document.getElementById('ceng').style.display='none';
document.getElementById('close').style.display='none';
document.getElementById('close').innerHTML = '';
}
}
</script>
</head>
<body>
<a href="#" onclick="ShowDiv(1)">点击弹出</a>
<div id="ceng" style="position:absolute;z-index:2;left:0;top:0;right:0;background-color:#000;filter:alpha(opacity=50);margin:1px 1px;display:none;width:100%;height:100%;text-align:center;">
</div>
<div id="close" style="position:absolute !important;left:30%;top:0px;z-index:3;border:1px solid #ff6600;background-color:#fff;margin:100px auto;padding:0px;display:none;width:510px;height:440px;text-align:right"></div>
</body>
</html>