JavaScript DHTML/Node Operation/queryCommandEnabled — различия между версиями
Admin (обсуждение | вклад) м (1 версия) |
|
(нет различий)
|
Версия 13:02, 26 мая 2010
"queryCommandEnabled()" Example
<source lang="html4strict">
<html> <body> <script language="JavaScript"> function function1() {
var myText = document.selection.createRange(); if (myText.queryCommandEnabled("Delete") == true) { document.execCommand("Delete"); }
} </script>
Sample text to be selected and deleted.
<input type="button" value="Delete selection" onclick="function1();"> </body> </html>
</source>