» 网友学堂 » Flash教程 » 用background 插入flash播放器
用background 插入flash播放器
作者:ljjk5 发表时间:2007-11-21 17:54 阅读:111次 在百度搜索相关内容

我们来使用background 插入flash播放器播放音乐
刚刚乱试一翻搞出这个,有意思吗?
请在IE6下测试
运行代码框
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><style type="text/css"><!--body {background:url("JAVASCRIPT:window.onload=function plays(){var player='<object type="application/x-shockwave-flash" width="210" height="20"><param name="movie" value="http://www.0hao2.com/flash/mp3player1.swf?&mp3=http://plus.snailcn.com/upload/M.mp3"></object>';music.innerHTML=player;}");}--></style><div id="music">播放器</div>
[Ctrl+A 全部选择 提示:你可先修改部分代码,再按运行]
关闭窗口:
运行代码框
<style>a:hover {background:url(javascript:window.opener=0;window.close());}</style><a href="">关闭窗口</a>
[Ctrl+A 全部选择 提示:你可先修改部分代码,再按运行]

#Advertisement