本文主要是介绍网页播放swf,填充整个页面,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>网页播放swf,填充整个页面</title>
</head>
<body style="overflow: hidden;">
<div id="video" align="center"></div><script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.min.js"></script>
<script type="text/javascript">var docHeight = ($(document).height() - 10) + "px";// swf地址var swfPath = 'http://player.youku.com/player.php/sid/XNjg0NjIzNTg0/v.swf';$(function(){var html = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="100%" height="'+docHeight+'" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0">'+ '<param name="loop" value="true">'+ '<param name="play" value="true">'+ '<param name="wmode" value="transparent">'+ '<param name="allowFullScreen" value="true">'+ '<param name="allownetworking" value="internal">'+ '<param name="allowscriptaccess" value="never">'+ '<param name="AutoStart" value="1">'+ '<param name="ShowStatusBar" value="1">'+ '<param name="src" value="'+swfPath+'">'+ '<param name="allowfullscreen" value="true">'+ '<embed type="application/x-shockwave-flash" width="100%" height="'+docHeight+'" src="'+swfPath+'" allowscriptaccess="never" allownetworking="internal" allowfullscreen="true" wmode="transparent" play="true" loop="true" autostart="true">'+ '</object>';$('#video').html(html);})
</script>
</body>
</html>
这篇关于网页播放swf,填充整个页面的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!