JavaScript Reference/Javascript Methods/removeBehavior

Материал из Web эксперт
Версия от 11:22, 26 мая 2010; Admin (обсуждение | вклад) (1 версия)
(разн.) ← Предыдущая | Текущая версия (разн.) | Следующая → (разн.)
Перейти к: навигация, поиск

"removeBehavior()" Example

   <source lang="javascript">
  

<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>
   
  


"removeBehavior()" is applied to

   <source lang="javascript">

+----------------+--------------------------------------------------------------+ | Applied_To |<a> <acronym> | | |<address> <applet> | | |<area> | | |<base> <basefont> | | |<bgsound> |

| |
<body> |

| |
<button> |

| |
|

| | | | |<col> <colgroup> | | |<comment> <custom> | | |

| | | <dir> |

| |
|

| |

| | |<embed> <fieldset> | | | <form> | | |<frame> <frameset> | | |<head> <hn> |

| |
<html> |

| | <iframe> | | |<img> <input type="button"> | | |<input type="checkbox"> <input type="file"> | | |<input type="hidden"> <input type="image"> | | |<input type="password"> <input type="radio"> | | |<input type="reset"> <input type="submit"> | | |<input type="text"> | | |<isindex> | | |<label> <legend> |

| |
  • <link> | | |<listing> <map> | | |<marquee> <menu> | | |<nobr> <noframes> | | |<noscript> <object> | | |
      <option> | | |

      <plaintext> | | |

                                                            |
      |                |                                                    |
      |                |                                                     |
      |                |<script>                        <select>                      |
      |                |                                                 |
      |                |                                              |
      |                |<style>                                                  |
      |                |                                                  |
      |                |<tbody>                                                   |
      |                |                                                       |
      |                |
        | | | <xml> | | |<xmp> | +----------------+--------------------------------------------------------------+ </source>

        "removeBehavior()" Syntax, Parameters and Note

        <source lang="javascript"> Note: Removes a behavior from the element. Returns true (successful) or false (failed).

        Syntax:

        document.all.elementID.removeBehavior(param1) Parameters: param1 Required; the behavior identifier.


        </source>

      |

      | |<textarea> <tfoot> |

      | |
      <thead> | | |<title>