html标签object和embed的区别
2014-03-12 14:03
495 查看
<!doctype html>
<html lang="en">
<head>
<title>object和embed的区别</title>
</head>
<body bgcolor="#ffffff">
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="900" height="300" id="Column3D" >
<param name="movie" value="XXX.swf" />
<param name="FlashVars" value="&dataURL=Data.xml">
<param name="quality" value="high" />
<embed src="xxx.swf" flashVars="&dataURL=Data.xml" quality="high" width="900" height="300" name="Column3D" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>
</body>
</html>
The code in bold above is the actual code that you need to place in your page to embed a FusionCharts chart.
In the above code, we've
used <OBJECT> and <EMBED> tags to embed the 3D Column Chart (Column3D.swf) within the HTML page.
used &dataUrl=Data.xml under FlashVars parameter to indicate the source of data to chart – Data.xml in this case. This method of indicating data is referred to as dataURL method of providing data.
specified chart width as 900 and chart height as 300.
To display a Flash movie correctly in a browser, HTML page should contain specific tags that specify the Flash movie file to be opened and played. There are two tags which are intended for it: <OBJECT> and <EMBED> tags.
These two tags are required to display a Flash movie in different Internet browsers properly. The <OBJECT> tag is used by Internet Explorer under Microsoft Windows and the <EMBED> tag is used by Netscape Navigator under Microsoft Windows or Mac OS. Each of
these two tags acts in the same way, however using only one tag may cause incompatibility of one of the browsers. To ensure that most browsers will play your Flash movies, you should place the <EMBED> tag nested within the <OBJECT> tag as shown in the example.
ActiveX-enabled browsers will ignore the <EMBED> tag inside the <OBJECT> tag. Netscape and old Microsoft browsers will not recognize the <OBJECT> tag and will use only the <EMBED> tag to load the Macromedia Flash Player. "
结论:
<object> 标签支持IE,<embed>标签支持旧版本的IE和其他的浏览器(如FF、chrome等)。所以在写页面的时候最好是按上面代码中的方式,将embed的内容嵌入到object标签内,这样就可以防止有的浏览器出现不兼容的情况了。
ps:为方遍测试,上面代码中的多媒体文件请自行替换本地文件路径及文件名。
<html lang="en">
<head>
<title>object和embed的区别</title>
</head>
<body bgcolor="#ffffff">
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="900" height="300" id="Column3D" >
<param name="movie" value="XXX.swf" />
<param name="FlashVars" value="&dataURL=Data.xml">
<param name="quality" value="high" />
<embed src="xxx.swf" flashVars="&dataURL=Data.xml" quality="high" width="900" height="300" name="Column3D" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>
</body>
</html>
The code in bold above is the actual code that you need to place in your page to embed a FusionCharts chart.
In the above code, we've
used <OBJECT> and <EMBED> tags to embed the 3D Column Chart (Column3D.swf) within the HTML page.
used &dataUrl=Data.xml under FlashVars parameter to indicate the source of data to chart – Data.xml in this case. This method of indicating data is referred to as dataURL method of providing data.
specified chart width as 900 and chart height as 300.
To display a Flash movie correctly in a browser, HTML page should contain specific tags that specify the Flash movie file to be opened and played. There are two tags which are intended for it: <OBJECT> and <EMBED> tags.
These two tags are required to display a Flash movie in different Internet browsers properly. The <OBJECT> tag is used by Internet Explorer under Microsoft Windows and the <EMBED> tag is used by Netscape Navigator under Microsoft Windows or Mac OS. Each of
these two tags acts in the same way, however using only one tag may cause incompatibility of one of the browsers. To ensure that most browsers will play your Flash movies, you should place the <EMBED> tag nested within the <OBJECT> tag as shown in the example.
ActiveX-enabled browsers will ignore the <EMBED> tag inside the <OBJECT> tag. Netscape and old Microsoft browsers will not recognize the <OBJECT> tag and will use only the <EMBED> tag to load the Macromedia Flash Player. "
结论:
<object> 标签支持IE,<embed>标签支持旧版本的IE和其他的浏览器(如FF、chrome等)。所以在写页面的时候最好是按上面代码中的方式,将embed的内容嵌入到object标签内,这样就可以防止有的浏览器出现不兼容的情况了。
ps:为方遍测试,上面代码中的多媒体文件请自行替换本地文件路径及文件名。
相关文章推荐
- html中object和embed标签的区别
- html标签object和embed的区别
- 关于IE和火狐,谷歌,Safari对Html标签Object和Embed的支持问题
- html embed 和 object的区别
- 关于IE和火狐,谷歌,Safari对Html标签Object和Embed的支持问题
- object标签和embed标签区别(转)
- 关于IE和火狐,谷歌,Safari对Html标签Object和Embed的支持问题
- HTML object/embed标签的wmode属性
- html标签之Object和EMBED标签详解
- 在HTML中使用object和embed标签插入视频
- 显示flash内容时用的OBJECT和EMBED标签区别介绍
- <转载>html标签之Object和EMBED标签详解
- embed object以及video标签的区别以及使用
- 关于IE和火狐,谷歌,Safari对Html标签Object和Embed的支持问题
- object embed标签区别
- html标签之Object和EMBED标签详解
- HTML中object标签和embed标签详解
- html标签之Object和EMBED标签详解
- 在HTML中使用object和embed标签插入视频
- 关于$(this)和this、[object object]和[object HTMLImageElement]区别和处理