开发者

Using object within Internet Explorer 8 (IE8)?

I have a video on a webpage that works in all browsers other than IE8 and IE7. Is this code not supported on those browsers?

<object class="video-frame" data="http://www.youtube.com/videofile" height="215" width="280">开发者_如何学编程</object>


According to w3School, the "object" tag is not yet supported by IE.
http://www.w3schools.com/tags/tag_object.asp

A good alternative for browser who don't support the "object" tag would be the "embed" tag.
"embed" is supported by all major browser.


You can use the new YouTube embedding code

<iframe width="280" height="215" src="http://youtube.com/embed/$videoId" frameborder="0" allowfullscreen></iframe>

That will take care of everything.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜