JavaScript DHTML/Node Operation/isContentEditable — различия между версиями
Admin (обсуждение | вклад) м (1 версия) |
|
(нет различий)
|
Версия 10:02, 26 мая 2010
"isContentEditable" Example
<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>
<p id="myP">Try to edit this text by overwriting any part of it.</p>
<button onclick="function1();">Make the text editable</button>
<button onclick="function2();">Make the text non-editable</button>
<button onclick="function3();">isContentEditable</button>
</body>
</html>