object标签参考(转载)

<object> 元素可支持多种不同的媒介类型,比如:

  • 图片
  • 音频
  • 视频
  • Other 对象

显示图片

你可以显示一幅图片:

<object height="100%" width="100%" type="image/jpeg" data="audi.jpeg"> </object>

显示网页

您可以显示一张网页:

<object type="text/html" height="100%" width="100%" data="http://www.w3school.com.cn"> </object>

播放音频

您可以播放音频:

<object classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95"> <param name="FileName" value="liar.wav" /> </object>

播放视频

你可以播放视频:

<object classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95"> <param name="FileName" value="3d.wmv" /> </object>

显示日历

您可以显示日历:

<object width="100%" height="80%" classid="clsid:8E27C92B-1264-101C-8A2F-040224009C02"> <param name="BackColor" value="14544622"> <param name="DayLength" value="1"> </object>

显示图形:

你可以显示图形:

<object width="200" height="200" classid="CLSID:369303C2-D7AC-11D0-89D5-00A0C90833E6"> <param name="Line0001" value="setFillColor(255, 0, 255)"> <param name="Line0002" value="Oval(-100, -50, 200, 100, 30)"> </object>

显示 Flash

您还可以显示 flash 动画:

<object width="400" height="40" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com /pub/shockwave/cabs/flash/swflash.cab#4,0,0,0"> <param name="SRC" value="bookmark.swf"> <embed src="bookmark.swf" width="400" height="40"></embed> </object>

为什么 class ID 会改变?

Windows Media Player 7 及更高版本的 class ID 是:clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6.

因特网上的许多地方把 class ID 声明为:clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95. 此 class ID 是一个老的版本,但是依然可以工作,这是因为其向后兼容性。但是如果您使用了老的 class ID,就无法使用增加到组件中的新特性了。

Windows Media Player 10

clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6 (与 WMP7 相同)

Windows Media Player 9

clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6 (与 WMP7 相同)

Windows Media Player 7

clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6

Windows Media Player 6.4

clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95

参数默认值描述
AudioStreamtrue 
AutoSizetrue 
AutoStarttrueSets if the player should start automatically
AnimationAtStarttrueSets if an animation should show while the file loads
AllowScantrue 
AllowChangeDisplaySizetrue 
AutoRewindfalse 
Balancefalse 
BaseURL  
BufferingTime5 
CaptioningID  
ClickToPlaytrueSets if the player should start when the user clicks in the play area
CursorTypefalse 
CurrentPositiontrue 
CurrentMarkerfalse 
DefaultFrame  
DisplayBackColorfalse 
DisplayForeColor16777215 
DisplayModefalse 
DisplaySizefalse 
Enabledtrue 
EnableContextMenutrue 
EnablePositionControlstrue 
EnableFullScreenControlsfalse 
EnableTrackertrue 
FilenameURLThe URL of the file to play
InvokeURLstrue 
Languagetrue 
Mutefalse 
PlayCount1 
PreviewModefalse 
Rate1 
SAMILang  
SAMIStyle  
SAMIFileName  
SelectionStarttrue 
SelectionEndtrue 
SendOpenStateChangeEventstrue 
SendWarningEventstrue 
SendErrorEventstrue 
SendKeyboardEventsfalse 
SendMouseClickEventsfalse 
SendMouseMoveEventsfalse 
SendPlayStateChangeEventstrue 
ShowCaptioningfalse 
ShowControlstrueSets if the player controls should show
ShowAudioControlstrueSets if the audio controls should show
ShowDisplayfalseSets if the display should show
ShowGotoBarfalseSets if the GotoBar should show
ShowPositionControlstrue 
ShowStatusBarfalse 
ShowTrackertrue 
TransparantAtStartfalse 
VideoBorderWidthfalse 
VideoBorderColorfalse 
VideoBorder3Dfalse 
Volume-200 
WindowlessVideofalse 
posted @ 2013-12-11 17:09  天马3798  阅读(255)  评论(0编辑  收藏  举报