字幕列表 影片播放 列印英文字幕 The element used for embedding multimedia and applications in HTML is called <object>. It replaces older tags such as <applet> and <embed>. <object> lets us include objects such as images, video, flash, sounds, and applications into a webpage. To include an object we have two attributes to specify its location. Data is used when we want to embed data that the browser can display by itself - such as a document or an image. Classid on the other hand is needed if our object needs to execute an external program - such as a media player, active-x control, or Java applet. The type attribute is used in combination with the data attribute to identify the data file type. Codetype is used together with the classid to identify the content type of the expected data. If codetype is omitted it will use the type attribute instead. The codebase attribute provides an alternative base URL from which the browser will retrieve the object. The value of this attribute is an link pointing to a directory containing the object referenced by the classid attribute. The standby attribute can be used to display a message while the browser is downloading the object data. Some other elements are available that we might recognize from the image tag. Most importantly, the height and width attributes which control the size of the object. The param tags are used as input parameters to objects. This tag may only appear inside an <object> element and has no content or end tag. It required two attributes: either name or id, and value. Together, they define a name/value pair that is passed to the object. As an example, to include a image in a document, we can use the object element like this To include a media player, the object will become a bit more complex, and the attributes may vary a lot depending on the media.
B1 中級 HTML教程-16-多媒體 (HTML Tutorial - 16 - Multimedia) 22 5 Pan-Shy Gang 發佈於 2021 年 01 月 14 日 更多分享 分享 收藏 回報 影片單字