execCommand Method
--------------------------------------------------------------------------------
Executes a command on the current document, current selection, or the given range.
Syntax
bSuccess = object.execCommand(sCommand [, bUserInterface] [, vValue])
Parameters
sCommand Required. String that specifies the command to execute. This command can be any of the command identifiers that can be executed in script.
bUserInterface Optional. Boolean that specifies one of the following values: false Default. Does not display a user interface.
true Displays a user interface, if the command supports one.
vValue Optional. Variant that specifies the string, number, or other value to assign. Possible values depend on sCommand .
Return Value
Boolean that returns one of the following values:
true The command was successful.
false The command was not successful.
Remarks
Do not invoke the execCommand method until after the page loads.
The bUserInterface and vValue parameters may be required depending on the command being executed.
Standards Information
There is no public standard that applies to this method.
Applies To
[ Object Name ]
Platform Version
Win16:
Win32:
Unix:
Mac:
Version data is listed when the mouse hovers over a link, or the link has focus.
document, controlRange, TextRange
Move the mouse pointer over an element in the Applies To list to display availability information for the listed platforms. Internet Explorer does not expose this member on platforms that are not listed.
See Also
queryCommandEnabled, queryCommandIndeterm, queryCommandState, queryCommandSupported, queryCommandValue
execommand命令支持saveas操作字符串
可能是document.execcommand('saveas',....)的用法;