JavaScript DHTML/Node Operation/removeBehavior

Материал из Web эксперт
Перейти к: навигация, поиск

"removeBehavior()" Example

   <source lang="html4strict">
   

<html> <body> <script language="JavaScript">

   var behaviorID
   function commandAdd() {
       behaviorID = document.all.myDiv.addBehavior("makeRed.htc");
   }
   function commandRemove() {
       document.all.myDiv.removeBehavior(behaviorID);
   }

</script> <button onclick="commandAdd();">Add behavior</button> <button onclick="commandRemove();">Remove behavior</button>

This is a div

</body> </html>


     </source>