欢迎来到.net学习网

欢迎联系站长一起更新本网站!QQ:879621940

您当前所在位置:首页 » Html » 正文

热门阅读

JavaScript开发技术之Document对象详解(二)

创建时间:2012年05月18日 11:37  阅读次数:(5221)
分享到:

2.execCommand()基本命令

(1)2D-Position 允许通过拖曳移动绝对定位的对象。

Command 2D-Position
User interface None. Set bUserinterface to false. 
execCommand vValue Required. Boolean specifying whether this feature is to be on or off.
Applies to queryCommandValue.

Minimum Availability:Internet Explorer 5.5 and later.
(2)AbsolutePosition 设定元素的 position 属性为“absolute”(绝对)。

Command AbsolutePosition
User interface None. Set bUserinterface to false. 
execCommand vValue Required. Boolean specifying whether the element is to be absolutely positioned.
Applies to queryCommandValue.

Minimum Availability:Internet Explorer 5.5 and later.
(3)BackColor 设置或获取当前选中区的背景颜色。

Command BackColor
User interface None. Set bUserinterface to false. 
execCommand vValue Required. String that specifies a color name or a six-digit hexadecimal RGB value, with or without a leading hash mark, as defined in the Color Table.
Applies to queryCommandValue.

Minimum Availability:Internet Explorer 4.0 and later.
BlockDirLTR 目前尚未支持。
BlockDirRTL 目前尚未支持。
Bold 切换当前选中区的粗体显示与否。

Command Bold
User interface None. Set bUserinterface to false or omit. 
execCommand vValue Optional. Set to null or omit.
Applies to queryCommandValue.

Minimum Availability:Internet Explorer 4.0 and later.
BrowseMode 目前尚未支持。
ClearAuthenticationCache 清除缓冲区的身份验证。仅用于execCommand.

Command ClearAuthenticationCache
User interface None. Set bUserinterface to false or omit. 
execCommand vValue Optional. Set to null or omit.
Applies to queryCommandValue.

Minimum Availability :Internet Explorer 6 SP1 and later.
Copy 将当前选中区复制到剪贴板。

Command Copy
User interface None. Set bUserinterface to false or omit. 
execCommand vValue Optional. Set to null or omit.
Applies to queryCommandValue.

Minimum Availability :Internet Explorer 4.0 and later.

CreateBookmark 创建一个书签锚或获取当前选中区或插入点的书签锚的名称。

Command CreateBookmark
User interface None. Set bUserinterface to false. 
execCommand vValue Required. String that specifies a valid anchor name. Providing an empty string will cause the command to fail.
Applies to queryCommandValue.

CreateLink 在当前选中区上插入超级链接,或显示一个对话框允许用户指定要为当前选中区插入的超级链接的 URL。

Command CreateLink
User interface Optional. This command displays a dialogue box if the bUserinterface argument of execCommand is set to true or omitted. It does not display a dialogue box if the argument is set to false or null and the vValue parameter is present (even if it's null).
execCommand vValue Optional. String that specifies a URL.
Applies to queryCommandValue.

Cut 将当前选中区复制到剪贴板并删除之。

Command Cut
User interface None. Set bUserinterface to false or omit. 
execCommand vValue Optional. Set to null or omit.
Applies to queryCommandValue.

Delete 删除当前选中区。

Command Delete
User interface None. Set bUserinterface to false or omit. 
execCommand vValue Optional. Set to null or omit.
Applies to queryCommandValue.

DirLTR 目前尚未支持。
DirRTL 目前尚未支持。
EditMode 目前尚未支持。
FontName 设置或获取当前选中区的字体。

Command FontName
User interface None. Set bUserinterface to false. 
execCommand vValue Required. String that specifies a font name or font list, as described by the font Attribute.
Applies to queryCommandValue.

FontSize 设置或获取当前选中区的字体大小。

Command FontSize
User interface None. Set bUserinterface to false. 
execCommand vValue Required. Integer or String that specifies the font size. This must be a value between 1 and 7, inclusive.
Applies to queryCommandValue.

ForeColor 设置或获取当前选中区的前景(文本)颜色。

Command ForeColor
User interface None. Set bUserinterface to false. 
execCommand vValue Required. String that specifies a color name or a six-digit hexadecimal RGB value, with or without a leading hash mark, as defined in the Color Table.
Applies to queryCommandValue.

FormatBlock 设置当前块格式化标签。

Command FormatBlock
User interface None. Set bUserinterface to false. 
execCommand vValue Required. String that specifies a valid block format tag.
Applies to queryCommandValue.

Indent 增加选中文本的缩进。

Command Indent
User interface None. Set bUserinterface to false or omit. 
execCommand vValue Optional. Set to null or omit.
Applies to queryCommandValue.

InlineDirLTR 目前尚未支持。
InlineDirRTL 目前尚未支持。
InsertButton 用按钮控件覆盖当前选中区。

Command InsertButton
User interface None. Set bUserinterface to false or omit. 
execCommand vValue Optional. String that specifies an id Attribute for the button control.
Applies to queryCommandValue.

InsertFieldset 用方框覆盖当前选中区。

Command InsertFieldset
User interface None. Set bUserinterface to false or omit. 
execCommand vValue Optional. String that specifies an id Attribute for the box. May be set to null or omitted.
Applies to queryCommandValue.

InsertHorizontalRule 用水平线覆盖当前选中区。

Command InsertHorizontalRule
User interface None. Set bUserinterface to false or omit. 
execCommand vValue Optional. String that specifies an id Attribute for the horizontal line. May be set to null or omitted.
Applies to queryCommandValue.

InsertIFrame 用内嵌框架覆盖当前选中区。

Command InsertIFrame
User interface None. Set bUserinterface to false or omit. 
execCommand vValue Optional. String that specifies an id Attribute for the inline frame. May be set to null or omitted.
Applies to queryCommandValue.

InsertImage 用图像覆盖当前选中区。

Command InsertImage
User interface Optional. This command displays a dialogue box if the bUserinterface argument of execCommand is set to true or omitted. It does not display a dialogue box if the argument is set to false or null and the vValue parameter is present (even if it's null).
execCommand vValue Optional. String that specifies the path and file name of the image to be inserted. If the command displays a dialogue box, this parameter is ignored.
Applies to queryCommandValue.

InsertInputButton 用按钮控件覆盖当前选中区。

Command InsertInputButton
User interface None. Set bUserinterface to false or omit. 
execCommand vValue Optional. String that specifies an id Attribute for the button control. May be set to null or omitted.
Applies to queryCommandValue.

InsertInputCheckbox 用复选框控件覆盖当前选中区。

Command InsertInputCheckbox
User interface None. Set bUserinterface to false or omit. 
execCommand vValue Optional. String that specifies an id Attribute for the check box control. May be set to null or omitted.
Applies to queryCommandValue.
b
来源:.net学习网
说明:所有来源为 .net学习网的文章均为原创,如有转载,请在转载处标注本页地址,谢谢!
【编辑:Wyf

打赏

取消

感谢您的支持,我会做的更好!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

最新评论

共有评论0条
  • 暂无任何评论,请留下您对本文章的看法,共同参入讨论!
发表评论:
留言人:
内  容:
请输入问题 17+38=? 的结果(结果是:55)
结  果: