Demo: http://www.huiyi8.com/jiaoben/
Demo: JavaScript effects
Code Flashbox
JavaScript Document
function Flashbox (src,width,height) {
var docbody = document.body;
var _w = docbody.offsetwidth;
var _x = parseint ((_w-width)/2);
var screendiv = document.createelement ("div");
Screendiv.style.cssText = ' width:100%; height:100%; bottom:0; Background: #000; Filter:alpha (opacity=80); opacity:0.8; Z-index:998;position:fixed;_position:absolute;z-index:10;top:0;_top:expression (eval ( DOCUMENT.DOCUMENTELEMENT.SCROLLTOP)); ';
var panel = document.createelement ("div");
Panel.style.cssText = ' Position:absolute; z-index:999; Left: ' + _x + ' px; Width: ' +width+ ' px; Height: ' +height+ ' px; Position:fixed;_position:absolute;z-index:10;top:200px;_top:expression (eval (document.documentElement.scrollTop +200) + "px"); BORDER:3PX solid #000; ‘;
var close = document.createelement ("div");
Close.style.cssText = ' Position:absolute; z-index:999; top:-24px; right:-24px; width:30px; Cursor:pointer; height:30px; Background:url (closebox.png) ';
var iframe= document.createelement ("iframe");
Iframe.style.cssText = ' Display:block; width:100%; height:100% ';
Iframe.width = Iframe.height = "100%";
Iframe.scrolling= "No";
Iframe.setattribute ("frameborder", "0");
Panel.appendchild (Close);
Panel.appendchild (IFRAME);
Docbody.appendchild (SCREENDIV);
Docbody.appendchild (panel);
var newdoc = Iframe.contentWindow.document.open ("text/html", "replace");
var txt = ' ' <embed height= ' ' +height+ ' "width=" ' +width+ ' "src=" ' +src+
' "Type=" Application/x-shockwave-flash "scale=" ShowAll "play=" true "loop=" true "menu=" true "></embed></ Body>
Newdoc.write (TXT);
Newdoc.close ();
Close.onclick=function () {
Panel.parentNode.removeChild (panel);
Screendiv.parentNode.removeChild (SCREENDIV);
}
}
Demo
Flashbox (' http://player.youku.com/player.php/Type/Folder/Fid/15455979/Ob/1/Pt/0/sid/XMzA1NzIwMTI4/v.swf ', 600,400);
JavaScript Flash Bullet Box