You are here: Reference > JavaScript > client-side > HTML DOM > properties > valueType (param)

valueType property (param)

Browser support:
Specifies or returns the type of the object that is set with the value property.

Syntax:

object.valueType;
You can find the related objects in the Supported by objects section below.
This property is read/write.
HTML page for this property: valueType

Possible values:

String that sets or retrieves the type of the data.
One of the following values:
data
Default. The contents of the value property is a string.
object
The contents of the value property is an identifier.
ref
The contents of the value property is a URI. The MIME type of the resource designated by the value property can be specified with the type property.
Default: data.

Example HTML code 1:

This example illustrates the use of the valueType attribute with Windows Media Player:
<object type="application/x-mplayer2" data="testVideo.wmv" width="320px" height="286px">
    <param name="src" value="testVideo.wmv" valuetype="ref" type="video/x-ms-wmv" />
</object>
Did you find this example helpful? yes no

Example HTML code 2:

This example illustrates the use of the valueType property with Windows Media Player:
<head>
    <script type="text/javascript">
        function GetValueType () {
            var videoFile = document.getElementById ("videoFile");
            alert (videoFile.valueType);
        }
    </script>
</head>
<body>
    <object type="application/x-mplayer2" data="testVideo.wmv" width="320px" height="286px">
        <param id="videoFile" name="src" value="testVideo.wmv" valuetype="ref" type="video/x-ms-wmv" />
    </object>

    <button onclick="GetValueType ();">Get the valueType of the parameter!</button>
</body>
Did you find this example helpful? yes no

Supported by objects:

Related pages:

External links:

User Contributed Comments

Post Content

Post Content