JavaScript Reference/Javascript Methods/addBehavior
"addBehavior()" 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>
</body> </html>
</source>
"addBehavior()" 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> | | |
| | |