isContentEditable与contentEditable的区别?

Fulai19803004 2009-10-30 04:11:11
我知道前一个为可读写,后一个为只读。对么?
...全文
552 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
dh20156 2009-10-30
  • 打赏
  • 举报
回复

isContentEditable Property
---------------------------
Retrieves the value indicating whether the user can edit the contents of the object.

Syntax

HTML N/A
Scripting [ bCanEdit = ] object.isContentEditable

Possible Values

bCanEdit Boolean that receives one of the following values.false The content cannot be edited.
true The content can be edited.

The property is read-only. The property has no default value.



CONTENTEDITABLE Attribute | contentEditable Property
----------------------------------------------------
Sets or retrieves the string that indicates whether the user can edit the content of the object.

Syntax

HTML <ELEMENT CONTENTEDITABLE = sCanEdit... >
Scripting object.contentEditable(v) [ = sCanEdit ]

Possible Values

sCanEdit String that specifies or receives one of the following values.inherit Default. Content's ability to be edited by user is inherited from object's parent.
false Content cannot be edited by the user.
true Content can be edited by the user.

The property is read/write. The property has a default value of inherit.
spllot 2009-10-30
  • 打赏
  • 举报
回复
从字面上都可以理解,前面是判断,返回值是true或false
后者是用来设置属性的.
happy664618843 2009-10-30
  • 打赏
  • 举报
回复
判断元素是否是可编辑的
ID 为“foo”的元素是否可以被编辑:

返回是bool类型
result=foo.isContentEditable;

处于可编辑状态
contentEditable=true
Fulai19803004 2009-10-30
  • 打赏
  • 举报
回复
另外,javascript的TDC数据绑定可以往dataSRL里写东西么?
Fulai19803004 2009-10-30
  • 打赏
  • 举报
回复
因为我觉得如果是这样那只要一个ContentEditable就够了吧。
应该不太一样。。。

87,921

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 JavaScript
社区管理员
  • JavaScript
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧