本文介绍了如何嵌入到HTML代码的SWF文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要将swf文件嵌入到html代码中。我该怎么做?使用SWFObject:解决方案
//code.google.com/p/swfobject/wiki/documentationrel =noreferrer> http://code.google.com/p/swfobject/wiki/documentation <!DOCTYPE html PUBLIC - // W3C // DTD XHTML 1.0 Strict // ENhttp://www.w3.org/TR /xhtml1/DTD/xhtml1-strict.dtd\">
< head>
< title> SWFObject动态嵌入 - 第3步< / title>
< meta http-equiv =Content-Typecontent =text / html; charset = iso-8859-1/>
< script type =text / javascriptsrc =swfobject.js>< / script>
< script type =text / javascript>
swfobject.embedSWF(myContent.swf,myContent,300,120,9.0.0);
< / script>
< / head>
< body>
< div id =myContent>
< p>替代内容< / p>
< / div>
< / body>
< / html>
I need to embed a swf file into html code. How can I do it?
解决方案
Use SWFObject:
http://code.google.com/p/swfobject/wiki/documentation
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>SWFObject dynamic embed - step 3</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<script type="text/javascript" src="swfobject.js"></script>
<script type="text/javascript">
swfobject.embedSWF("myContent.swf", "myContent", "300", "120", "9.0.0");
</script>
</head>
<body>
<div id="myContent">
<p>Alternative content</p>
</div>
</body>
</html>
这篇关于如何嵌入到HTML代码的SWF文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!