複製鏈接
請複製以下鏈接發送給好友

param

鎖定
param(參數)是一款不可由 PARAM 對象變更的編程,定義為HTML元素 - param。
中文名
參數
外文名
param
相關領域
編程
定    義
HTML元素 - param
注    意
不可由 PARAM 對象變更
註    釋
APPLET,EMBED和OBJECT元素有效

param基本信息

設置 APPLET、EMBED 或 OBJECT 元素的屬性初始值。
Sets the initial value of a property for an APPLET, EMBED, or OBJECT element.
PARAM 元素。
注意 由 PARAM 元素設置的屬性不可由 PARAM 對象變更。
在 APPLET, EMBED 或 OBJECT 元素實例創建完成後,由 PARAM 元素設置的屬性無法用 param 對象更改。要更改對象的屬性,請使用由對象引出的腳本屬性。
此元素在 Internet Explorer 3.0 及以上版本的 HTML 中可用。
此元素不會改變顯示。
此元素不需要關閉標籤。
The PARAM element is valid within the APPLET, EMBED, and OBJECT elements.
Note Properties set by a PARAM element cannot be altered by changing the PARAM object.
After the APPLET, EMBED, or OBJECT element is instantiated, the property set by the PARAM element cannot be changed with the param object. To change the object's properties, use the script properties exposed by the object.
This element is available in HTML as of Internet Explorer 3.0.
This element is not rendered.
This element does not require a closing tag.

param示例代碼

下面的例子顯示了 Internet Explorer 數據綁定組件的 outerHTML,這樣你就可以查看由 PARAM 元素指定的屬性。執行這樣的檢查可以在調試 OBJECT 元素屬性時收集信息。除非重新初始化 outerHTML 對象,否則無法編輯對象的 outerHTML 屬性。
This example displays the Internet Explorer Data Binding component's outerHTML so you can view the properties assigned by the PARAM elements. You can perform this check to gather information when debugging an OBJECT element's properties. You cannot edit the object's outerHTML property without reintializing the outerHTML object.
// The OBJECT CLASSID below is for the // Microsoft Internet Explorer Data Binding component // Use just the following HTML and press the button
示例:
<object id="player" height="200" width="240" classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6">
<!--是否透明-->
<param name="wmode" value="transparent">
<param name="AutoStart" VALUE="-1">
<!--是否自動播放-->
<param name="Balance" VALUE="0">
<!--調整左右聲道平衡,同上面舊播放器代碼-->
<param name="enabled" value="-1">
<!--播放器是否可人為控制-->
<param name="EnableContextMenu" VALUE="-1">
<!--是否啓用上下文菜單-->
<param name="url" VALUE="ai178.wmv">
<!--播放的文件地址,上面只是個示例-->
<param name="PlayCount" VALUE="1">
<!--播放次數控制,為整數-->
<param name="rate" value="1">
<!--播放速率控制,1為正常,允許小數,1.0-2.0-->
<param name="currentPosition" value="0">
<!--控件設置:當前位置-->
<param name="currentMarker" value="0">
<!--控件設置:當前標記-->
<param name="defaultFrame" value="">
<!--顯示默認框架-->
<param name="invokeURLs" value="0">
<!--腳本命令設置:是否調用URL-->
<param name="baseURL" value="">
<!--腳本命令設置:被調用的URL-->
<param name="stretchToFit" value="0">
<!--是否按比例伸展-->
<param name="volume" value="50">
<!--默認聲音大小0%-100%,50則為50%-->
<param name="mute" value="0">
<!--是否靜音-->
<param name="uiMode" value="mini">
<!--播放器顯示模式:Full顯示全部;mini最簡化;None不顯示播放控制,只顯示視頻窗口;invisible全部不顯示-->
<param name="windowlessVideo" value="0">
<!--如果是0可以允許全屏,否則只能在窗口中查看-->
<param name="fullScreen" value="0">
<!--開始播放是否自動全屏-->
<param name="enableErrorDialogs" value="-1">
<!--是否啓用錯誤提示報告-->
<param name="SAMIStyle" value>
<!--SAMI樣式-->
<param name="SAMILang" value>
<!--SAMI語言-->
<param name="SAMIFilename" value>
<!--字幕ID-->
</object>

param代碼差異

HTML 4.01 中param元素的"type" 和 "valuetype"屬性在 HTML5 中不被支持。

param必需的屬性

屬性
描述
DTD
name
unique_name
定義參數的名稱(用在腳本中)。
STF

param可選的屬性

屬性
描述
DTD
type
MIME type
規定參數的 MIME 類型(internet media type)。
STF
value
value
規定參數的值。
STF
valuetype
data
ref
object
規定值的 MIME 類型。
STF

param標準屬性

id
[1] 

param全局屬性

class、data-*、dir、dropzone、id、lang、styletitle、hidden、spellcheck、contextmenu [2] 
參考資料