JavaScript Reference/Javascript Properties/contentEditable — различия между версиями
Admin (обсуждение | вклад) м (1 версия) |
|
(нет различий)
|
Текущая версия на 11:21, 26 мая 2010
Содержание
"contentEditable" Example
<source lang="javascript">
<html> <body> <script language="JavaScript"> function function1() {
myP.innerText = "Try to edit this text by overwriting any part of it."; document.all.myP.contentEditable = "true"; ]
} function function2() {
myP.innerText = "Try again."; document.all.myP.contentEditable = "false";
} function function3(){
alert(document.all.myP.isContentEditable);
} </script>
Try to edit this text by overwriting any part of it.
<button onclick="function1();">Make the text editable</button> <button onclick="function2();">Make the text non-editable</button> <button onclick="function3();">isContentEditable</button> </body> </html>
</source>
"contentEditable" is applied to
<source lang="javascript">
+----------------+--------------------------------------------------------------+ | Applied_To |<a> <acronym> | | |<address> | | | |
| |<body> | | |<button>| | |
| || | |<custom>
| | |defaults | | | <dir> ||
| |
- | | |<fieldset> | | |<form> <hn> | | | <input type="button"> | | |<input type="password"> <input type="radio"> | | |<input type="reset"> <input type="submit"> | | |<input type="text"> | | |<isindex> | | |<label> <legend> | | |
- <listing> | | |<marquee> <menu> | | |<nobr>
| | |
<plaintext> | | |
| | |