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

html: Sample code sharing of tag

Jun 30, 2017 am 11:16 AM
html object code

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!

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

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Hot Topics

Java Tutorial
1664
14
PHP Tutorial
1267
29
C# Tutorial
1239
24
Table Border in HTML Table Border in HTML Sep 04, 2024 pm 04:49 PM

Guide to Table Border in HTML. Here we discuss multiple ways for defining table-border with examples of the Table Border in HTML.

Nested Table in HTML Nested Table in HTML Sep 04, 2024 pm 04:49 PM

This is a guide to Nested Table in HTML. Here we discuss how to create a table within the table along with the respective examples.

HTML margin-left HTML margin-left Sep 04, 2024 pm 04:48 PM

Guide to HTML margin-left. Here we discuss a brief overview on HTML margin-left and its Examples along with its Code Implementation.

HTML Table Layout HTML Table Layout Sep 04, 2024 pm 04:54 PM

Guide to HTML Table Layout. Here we discuss the Values of HTML Table Layout along with the examples and outputs n detail.

HTML Input Placeholder HTML Input Placeholder Sep 04, 2024 pm 04:54 PM

Guide to HTML Input Placeholder. Here we discuss the Examples of HTML Input Placeholder along with the codes and outputs.

How do you parse and process HTML/XML in PHP? How do you parse and process HTML/XML in PHP? Feb 07, 2025 am 11:57 AM

This tutorial demonstrates how to efficiently process XML documents using PHP. XML (eXtensible Markup Language) is a versatile text-based markup language designed for both human readability and machine parsing. It's commonly used for data storage an

HTML Ordered List HTML Ordered List Sep 04, 2024 pm 04:43 PM

Guide to the HTML Ordered List. Here we also discuss introduction of HTML Ordered list and types along with their example respectively

HTML onclick Button HTML onclick Button Sep 04, 2024 pm 04:49 PM

Guide to HTML onclick Button. Here we discuss their introduction, working, examples and onclick Event in various events respectively.

See all articles