Home > Web Front-end > HTML Tutorial > html: Sample code sharing of tag

html: Sample code sharing of tag
黄舟
Release: 2017-06-30 11:16:29
Original
1807 people have browsed it

The

object tag is used to define an embedded object, including: images, audio, Java applets, ActiveX, PDF and Flash. This tag allows you to specify the data and parameters of the object inserted into the HTML document, as well as the code that can be used to display and manipulate the data.

Commonly used functions:

1. Display pictures:

[color=Red]<object 
height
="100%" width="100%"
type="image/jpeg" data="audi.jpeg">
</object>[/color]
<html>
<body>
<h2>Picture As Object</h2>
<object height="100%" width="100%"
type="image/jpeg" data="/i/eg_audi.jpg">
</object>
</body>
</html>
<html>
<body>
<h2>Picture As Object</h2>
<object height="100%" width="100%"
type="image/jpeg" data="http://www.fuguojian.cn/blog2/attachments/month_0812/k2008122805216.jpg">
</object>
</body>
</html>
Copy after login

2. Display web pages:

[color=Red]<object type="text/html" height="100%" width="100%"
data="http://www.w3school.com.cn">
</object>[/color]
<html>
<body>
<h2>Web Page AS Object</h2>
<object type="text/html" height="100%" width="100%"
data="http://blog.fuguojian.cn">
</object>
</body>
</html>
Copy after login

3. , Play audio:

[color=Red]<object
classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95">
<param name="FileName" value="liar.wav" />
</object>[/color]
<html>
<body>
<h2>Playing The Object</h2>
<object
height="50%"
width="50%"
classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95">
<param name="AutoStart" value="1" />
<param name="FileName" value="http://www.fuguojian.cn/music/Big%20Big%20World.mp3" />
</object>
</body>
</html>
Copy after login

4. Display calendar:

[color=Red]<object width="100%" height="80%"
classid="clsid:8E27C92B-1264-101C-8A2F-040224009C02">
<param name="BackColor" value="14544622">
<param name="DayLength" value="1">
</object>[/color]
<html>
<body>
<h2>
Calendar
 Object</h2>
<object width="100%" height="80%"
classid="clsid:8E27C92B-1264-101C-8A2F-040224009C02">
  <param name="BackColor" value="14544622">
  <param name="DayLength" value="1">
</object>
</body>
</html>
Copy after login

5. Display graphics:

[color=Red]<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>[/color]
<html>
<body>
<h2>Graphic Object</h2>
<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>
</body>
</html>
Copy after login

6. Display Flash:

[color=Red]<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="http://www.fuguojian.cn/blog2/123/time.swf" width="400" height="40"></embed>
</object>[/color]
<html>
<body>
<h2>Flash Animation As Object</h2>
<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="http://www.fuguojian.cn/blog2/123/time.swf" width="400" height="40"></embed>
</object>
</body>
</html>
Copy after login

7. Play video:

[color=Red]<object
classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95">
<param name="FileName" value="3d.wmv" />
</object>[/color]
<html>
<body>
<h2>Playing The Object</h2>
<object
classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95">
<param
name="FileName"
value="http://www.ananova.com/about/vap_windows_check.wmv" />
</object>
</body>
</html>
Copy after login


element can play QuickTime movies
Through the object element, you can easily play QuickTime movies Code is added to the web page. If the QuickTime player is not installed on the user's computer, the object setting

can be set to automatically install the QuickTime player.

Solution:
These codes for playing QuickTime movies:

[color=Red]<object width="160" height="144"
classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B"
codebase="http://www.apple.com/qtactivex/qtplugin.cab">
<param name="src" value="sample.mov">
<param name="
autoplay
" value="true">
<param name="controller" value="false">
<embed src="sample.mov" width="160" height="144"
autoplay="true" controller="false"
pluginspage="http://fuguojian.cn/blog2/">
</embed>[/color]</object>
<object> 元素
Copy after login

The width and height attributes of the object elementshould match the size of the video (measured in pixels).
classid uniquely identifies the player software to use. It must be set to "clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B".

This unique code identifies an ActiveX control that

must be installed on the user's PC before the movie can play. If the user does not have the ActiveX control installed, the browser will automatically download and install it. The

codebase attribute specifies the base path used to resolve relative URLs specified by the classid, data, and archive attributes. If not specified, its default value is the base URL of the current document. Note: Internet Explorer uses this attribute to specify the download location of the player. This property must be set to "http://www.apple.com/qtactivex/qtplugin.cab"

. This location contains the latest version of QuickTime Player.

The src parameter points to the movie file.

If you want the movie to play automatically, set the autoplay parameter to "true".

If you do not want to display control buttons, set the controller parameter to "false".

The above is the detailed content of html: Sample code sharing of tag. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template