mozilla 文档地址:https://developer.mozilla.org/en/Rich-Text_Editing_in_Mozilla#Executing_Commands
msdn 文档地址:
http://msdn.microsoft.com/en-us/library/aa752577(v=VS.85).aspx
http://msdn.microsoft.com/en-us/library/ms533049(v=VS.85).aspx
mozllia
execCommand(String aCommandName, Boolean aShowDefaultUI, String aValueArgument)
Arguments
String aCommandName:the name of the command
Boolean aShowDefaultUI:
whether the default user interface should be shown. This is not implemented in Mozilla.
String aValueArgument:some commands (such as insertimage) require an extra value argument (the image's url). Pass an argument of null if no argument is needed.
msdn
HRESULT execCommand(
BSTR cmdID,
VARIANT_BOOL showUI,
VARIANT value,
VARIANT_BOOL *pfRet
);
cmdID:[in] BSTR that specifies the command to execute. This command can be any of the command identifiers that can be executed in script.
showUI:[in] VARIANT_BOOL that specifies one of the following values.
VARIANT_FALSE:Default. Do not display a user interface. Must be combined with value, if the command requires a value.
VARIANT_TRUE:Display a user interface if the command supports one.
value:[in] VARIANT that specifies the string, number, or other value to assign. Possible values and possible VARIANT subtypes depend on the command.
pfRet:[out, retval] Pointer to a VARIANT_BOOL that returnsVARIANT_TRUE if the command is successful.
结论:
document.execCommand(cmd, false, value);
- 大小: 12.2 KB
分享到:
相关推荐
document.execCommand()的用法
execCommand指令集详解,javascript进阶是常用的参考资料
html中的内容直接下载到excel中的demo,替换 document.execCommand(‘saveAs’)方法
javascript 的execCommand和操作剪贴板的收集
NULL 博文链接:https://vb2005xu.iteye.com/blog/319918
Js之execCommand解析.pdf
本篇文章主要是对document.execCommand()的用法进行了详细的介绍,需要的朋友可以过来参考下,希望对大家有所帮助
主要给大家介绍在JavaScript中如何解决用execCommand("SaveAS")保存页面兼容性问题,设计到execCommand兼容性问题,感兴趣的朋友可以参考下本
dom下execCommand命令的一些参数整理,需要的朋友可以参考下。
执行命令 一个非常简单的包装器,用于在 NodeJS ... var execCommand = require ( "execCommand.js" ) ; var command = execCommand ( "cat /sys/class/thermal/thermal_zone0/temp" ) ; console . log ( command ) ;
IE6下设置背景图片是不会被真正cache住的,就算服务器做了cache,如果想cache住只能
2D-Position 允许通过拖曳移动绝对定位的对象。 AbsolutePosition 设定元素的 position 属性为“absolute”(绝对)。 BackColor 设置或获取当前选中区的背景颜色。 BlockDirLTR 目前尚未支持。...
contentEditables 中 document.execCommand 的一个稍微甜一点的 api。 目标: 公开一个更容易发现的 api 以在 contentEditables 中使用。 由 DIY WYSIWYG 工具栏控制的基本功能 无依赖 ~200 行(5k-ish 未压缩) ...
Pixy方法受到IE的cache bug影响会闪烁。其实并没有说清楚这个问题,但其实该bug是有条件的,即IE的cache设置为Every...此外有人发现了一个未公开的方法来让IE对背景图进行缓存: document.execCommand(“BackgroundImag
本文将详细介绍cument.execCommand()用法,需要了解的朋友可以参考下
case 1: E.document.execCommand("Bold");break; case 2: E.document.execCommand("Italic");break; case 3: E.document.execCommand("Underline");break; case 6: var _Text=RemoveHTML(_Text); _Text=window....
ssh-exec, 使用 node.js 在ssh上执行脚本 ssh在ssh上执行脚本,使用 node.js 和管道,并从可以通过npm提供。npm install ssh-exec它是用普通的Javascript编写的,使用了 ssh2作为所有重。用法var ex