HTML5'contenteditable'有效值 [英] HTML5 'contenteditable' valid values
问题描述
我可以为属性contenteditable选择什么值。
它可以包含:
-
true
-
false $ c
$ p
$ > 引用:
正在获取的contentEditable DOM属性必须返回字符串如果内容属性设置为
true状态,则为true> true
;如果内容
属性设置为false状态,则为 false ,
和继承否则。设置时,
如果新值不区分大小写,
等于字符串inherit,则
必须删除content属性,如果
新值不区分大小写
等于字符串true,那么
content属性必须设置为
字符串true ,如果新值是
,则不区分大小写等于s如果
为false,则内容属性
必须设置为字符串false,否则
否则属性setter必须
引发SYNTAX_ERR异常。
来源: http://www.w3.org/TR/2008/WD-html5-20080610/editing.html
What values can I choose for the attribute contenteditable.
解决方案It can contain:
true
false
inherit
Quoting:
The contentEditable DOM attribute, on getting, must return the string "true" if the content attribute is set to the true state, false" if the content attribute is set to the false state, and "inherit" otherwise. On setting, if the new value is case-insensitively equal to the string "inherit" then the content attribute must be removed, if the new value is case-insensitively equal to the string "true" then the content attribute must be set to the string "true", if the new value is case-insensitively equal to the string "false" then the content attribute must be set to the string "false", and otherwise the attribute setter must raise a SYNTAX_ERR exception.
Source: http://www.w3.org/TR/2008/WD-html5-20080610/editing.html
这篇关于HTML5'contenteditable'有效值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!