You are here: Reference > JavaScript > client-side > HTML DOM > objects > nodes and tags > param

param object

Browser support:
Specifies a parameter to be passed to an applet, embed, or object element.
Use the param element to specify additional object properties. The properties depend on the embedded application.

Syntax:

Methods that return the object:
document.createElement ("param")
The base interface, through which you can add new functionalities to the param object, is the HTMLParamElement interface.
If you want to see the HTML objects by categories, please visit this page.
HTML page for this element: param

Possible members:

Properties
Methods
Events
Style properties
attributes
Represents a collection of attribute nodes that belong to an element.
baseURI
10
Returns the base URL for the object.
behaviorUrns
Represents a collection of the Uniform Resource Names for all behaviors attached to an element.
canHaveChildren
Retrieves a Boolean value that indicates whether the element can contain child elements.
canHaveHTML
Retrieves a Boolean value that indicates whether the element can contain HTML formatted text.
id
Sets or retrieves a unique identifier for the object.
isContentEditable
Returns a Boolean value that indicates whether the contents of the object are editable by the user.
isDisabled
Returns a Boolean value that indicates whether the object is disabled.
isMultiLine
Returns a Boolean value that indicates whether the contents of an element can be multiline or not.
isTextEdit
Returns a Boolean value that indicates whether the createTextRange method can be used for the element.
localName
9
Returns the local part of the qualified name of the current node.
name
Specifies or returns what data is being passed in the value property to the object.
namespaceURI
93.6
Sets or returns the namespace URI of the current node.
nextElementSibling
93.5
Returns a reference to the next child element of the current element's parent.
nextSibling
Returns a reference to the next child of the current element's parent.
nodeName
Returns the name of the current node.
nodeType
Returns an integer that indicates the type of the node.
nodeValue
Sets or returns the value of the current node.
outerHTML
Sets or retrieves the outer HTML content (the source code including the opening and closing tags) of an element.
outerText
Sets or returns the text content of an element including the text content of its descendants.
ownerDocument
Returns the document object that contains the current node.
parentElement
Returns the parent element of the object in the DOM hierarchy.
parentNode
Returns the parent element of the current node in the DOM hierarchy.
parentTextEdit
Returns the closest ancestor element of the current element in the DOM hierarchy that can be used to create a TextRange object.
previousElementSibling
93.5
Returns a reference to the previous child element of the current element's parent.
previousSibling
Returns a reference to the previous node of the current element's parent.
readyState
Returns a string value that represents the state of the object.
runtimeStyle
Represents the overridden style settings for an element.
scopeName
Retrieves the local name of the namespace declared for the current element.
sourceIndex
Returns the position of the current object in the all collection of the document.
style
Represents the inline style settings for an element or a CSS rule.
tagName
Returns the tag name of the current element.
tagUrn
Sets or retrieves the Uniform Resource Name (URN) of the namespace declared for the current element.
type
Specifies or returns the MIME type of the resource referenced by the value property. The type property can be used only if the value of the valueType property is set to 'ref'.
uniqueID
Returns the unique identifier generated by the browser for the object.
value
Specifies or returns the value of a run-time parameter specified by name.
valueType
Specifies or returns the type of the object that is set with the value property.

Example HTML code 1:

This example illustrates the use of the param and object elements to embed a Macromedia Flash Movie. The codeBase attribute of the object tag is missing from this example. You can check the version of the user's Flash player with this attribute in Internet Explorer, and if it does not exist or its version is lower than required, the browser pops up an installation dialog. Unfortunately, the use of the codeBase attribute causes problems in Firefox. See Example 2 for a cross-browser solution or the codeBase attribute for further details.
<object data="flash.swf" type="application/x-shockwave-flash" width="300px" height="200px">
        <!-- If flash player is not installed, pluginurl helps the user to download it in Firefox -->
    <param name="pluginurl" value="http://www.macromedia.com/go/getflashplayer" />
    
    <param name="movie" value="flash.swf" />  
    <param name="bgcolor" value="#FFFFE0" />  
    <param name="quality" value="high" />
</object>
Did you find this example helpful? yes no

Example HTML code 2:

This example illustrates the use of the param element with Macromedia Flash Player.
It clearly focuses on cross-browser support only, and it isn’t standards-compliant, but there isn't any standards-compliant cross-browser way to embed a Flash application into a document with Flash Player detection.
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="300" height="120" 
        codebase="http://fpdownload.adobe.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0">
    <param name="movie" value="flash.swf" />
    <!-- Optional params -->
    <param name="play" value="true" />
    <param name="loop" value="true" />
    <param name="quality" value="high" />
    <!-- END Optional -->
    <embed src="flash.swf" width="300" height="120" play="true" 
        loop="true" quality="high" 
        pluginspage="http://www.adobe.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" /> 
</object>
Did you find this example helpful? yes no

Example HTML code 3:

This example has similar functionality to the previous one, but it creates the Macromedia Flash Movie dynamically.
Code
flash.js
<head>
    <script type="text/javascript" src="flash.js"></script>
    <script type="text/javascript">
        function CreateFlash () {
            var flashContainer = document.getElementById ("flashContainer");
            var flash = new Flash ();
            flash.Init (flashContainer, "flash.swf", 300, 200);
            flash.SetParam ('bgcolor', '#000000');
            flash.SetParam ('quality', 'high');
            flash.Create ();
        }
    </script>
</head>
<body onload="CreateFlash ()">
    <div id="flashContainer"></div>
</body>
Did you find this example helpful? yes no

Related pages:

External links:

User Contributed Comments

Post Content

Post Content