Dynamic HTML Attributes |
Attributes of XHTML Tags for DHTML - onclick onmouseoverWhen you set out to write dynamic HTML, you need to understand the different ways you can impact the elements on the page. Usually, the elements can have one or more of the following attributes that indicate an action moment in reference to the page. Once you've decided when you want a dynamic action to occur, you add your scripting language to one of these attributes and make that element dynamic. Some NotesThe most common way to write these attributes is with a mixed case, but with XHTML, attributes should be written in lower case. This means that onclick and OnClick mean the same thing, but onclick is valid XHTML. Also, this article will not teach you scripts to use with these attributes. Check out the JavaScript site at About for help with actual scripts. Finally, while these attributes are valid, not all browsers support them in the same ways, so be sure to test your scripts before releasing them. Mouse Related Eventsonclick The onclick attribute works with all elements except: applet, base, basefont, bdo, br, font, frame, frameset, head, html, iframe, isindex, meta, param, script, style, and title. ondblclick The ondblclick attribute works with all elements except: applet, base, basefont, bdo, br, font, frame, frameset, head, html, iframe, isindex, meta, param, script, style, and title. onmousedown The onmousedown attribute works with all elements but applet, base, basefont, bdo, br, font, frame, frameset, head, html, iframe, isindex, meta, param, script, style, and title. onmouseup The onmouseup attribute works with all elements but applet, base, basefont, bdo, br, font, frame, frameset, head, html, iframe, isindex, meta, param, script, style, and title. onmousemove The onmousemove attribute works with all elements but applet, base, basefont, bdo, br, font, frame, frameset, head, html, iframe, isindex, meta, param, script, style, and title. onmouseout The onmouseout attribute works with all elements but applet, base, basefont, bdo, br, font, frame, frameset, head, html, iframe, isindex, meta, param, script, style, and title. onmouseover The onmouseover attribute works with all elements but applet, base, basefont, bdo, br, font, frame, frameset, head, html, iframe, isindex, meta, param, script, style, and title. Review focus, form, page, and frame related events on page 2. |
| 1 | 2 | next |

