HTMLcontenteditable属性_
例
編集可能な段落:
<p contenteditable="true">This is an editable paragraph.</p>
定義と使用法
このcontenteditable
属性は、要素のコンテンツが編集可能かどうかを指定します。
注:属性が要素に設定されていない場合contenteditable
、要素はその親から属性を継承します。
ブラウザのサポート
表の数字は、属性を完全にサポートする最初のブラウザーバージョンを示しています。
Attribute | |||||
---|---|---|---|---|---|
contenteditable | 4.0 | 6.0 | 3.5 | 3.1 | 10.1 |
構文
<element contenteditable="true|false">
属性値
Value | Description |
---|---|
true | Specifies that the element is editable |
false | Specifies that the element is not editable |
関連ページ
HTMLチュートリアル:HTML属性
HTML DOMリファレンス:HTML DOMcontentEditableプロパティ