HTML CSS Reference/CSS Attributes and Javascript Style Properties/behavior

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

"behavior" Example

    
<html xmlns:ie>
<head>
<style>
@media all { IE\:homePage {behavior:url(http://www.wbex.ru)}
} 
</style>
</head>
<body>
<ie:homepage id="wbex" />
<p>
<id="myL" a href="http://www.wbex.ru" onclick="goHomePage()">Navigate to your home page</a>
</p>
</body>
</html>



"behavior" is applied to

+----------------+--------------------------------------------------------------+
| Applied_To     |<a>                             <acronym>                     |
|                |<address>                       <applet>                      |
|                |<area>                          <b>                           |
|                |<base>                          <basefont>                    |
|                |<bgsound>                       <big>                         |
|                |<blockquote>                    <body>                        |
|                |<button>                        <caption>                     |
|                |<center>                        <cite>                        |
|                |<code>                          <col>                         |
|                |<colgroup>                      <comment>                     |
|                |currentStyle                    <custom>                      |
|                |<dd>                            defaults                      |
|                |<del>                           <dfn>                         |
|                |<dir>                           <div>                         |
|                |<dl>                            <dt>                          |
|                |<em>                            <embed>                       |
|                |<fieldset>                      <font>                        |
|                |<form>                          <frame>                       |
|                |<frameset>                      <head>                        |
|                |<hn>                            <hr>                          |
|                |<html>                          <i>                           |
|                |<iframe>                        <img>                         |
|                |<input type="button">           <inputtype="checkbox">        |
|                |<input type="file">             <input type="hidden">         |
|                |<input type="image">            <input type="password">       |
|                |<input type="radio">            <input type="reset">          |
|                |<inputtype="submit">            <input type="text">           |
|                |<ins>                           <isindex>                     |
|                |<kbd>                           <label>                       |
|                |<legend>                        <li>                          |
|                |<link>                          <listing>                     |
|                |<map>                           <marquee>                     |
|                |<menu>                          nextID                        |
|                |<nobr>                          <noframes>                    |
|                |<noscript>                      <object>                      |
|                |<ol>                            <option>                      |
|                |<p>                             <pre>                         |
|                |<q>                             <rt>                          |
|                |<ruby>                          runtimeStyle                  |
|                |<s>                             <samp>                        |
|                |<script>                        <select>                      |
|                |<small>                         <span>                        |
|                |<strike>                        <strong>                      |
|                |style                           <sub>                         |
|                |<sup>                           <table>                       |
|                |<tbody>                         <td>                          |
|                |<textarea>                      <tfoot>                       |
|                |<th>                            <thead>                       |
|                |<title>                         <tr>                          |
|                |<tt>                            <u>                           |
|                |<ul>                            <var>                         |
|                |<wbr>                           <xml>                         |
|                |<xmp>                                                         |
+----------------+--------------------------------------------------------------+



"behavior" Possible Values

Possible Values
    
url(HTCpathname)       The pathname can be an absolute or relative location
url(#objectName)       The behavior is defined in an <object> element embedded in 
                       the page
url(#default#behaviorName)  The URL identifies an IE default behavior by its name



"behavior" Syntax and Note

Note:
The element behavior location. 
To specify multiple behaviors, separate each behavior with a space.
Syntax:
    
element { behavior: value }
elementID.style.behavior = "value"
document.all.elementID.style.behavior = "value"