Atributos do evento de XHTML |
A abilidade de provocar ações no browser por eventos do HTML é nova a HTML 4.0, como executar um Javascript quando um usuário estala sobre um elemento do HTML. Está aqui uma lista dos atributos que definem ações do evento. estes atributos podem ser introduzidos em Tag do HTML
Eventos da janela
Estes são válidos somente em elementos do corpo e do frameset
Attribute |
Value |
Description |
onload |
script |
Script to be run when a document loads |
onunload |
script |
Script to be run when a document unloads |
Form Element Events
These are valid only in form elements.
Attribute |
Value |
Description |
onchange |
script |
Script to be run when the element changes |
onsubmit |
script |
Script to be run when the form is submitted |
onreset |
script |
Script to be run when the form is reset |
onselect |
script |
Script to be run when the element is selected |
onblur |
script |
Script to be run when the element loses focus |
onfocus |
script |
Script to be run when the element gets focus |
Keyboard Events
Not valid in base, bdo, br, frame, frameset, head, html, iframe, meta, param,
script, style, and title elements.
Attribute |
Value |
Description |
onkeydown |
script |
What to do when key is pressed |
onkeypress |
script |
What to do when key is pressed and released |
onkeyup |
script |
What to do when key is released |
Mouse Events
These are not valid in base, bdo, br, frame, frameset, head, html, iframe, meta, param,
script, style, and title elements.
Attribute |
Value |
Description |
onclick |
script |
Action will be taken on mouse click |
ondblclick |
script |
Action will be taken on doubleclicking the mouse |
onmousedown |
script |
Action to be performed when mouse button is pressed |
onmousemove |
script |
Action to be performed when mouse pointer moves |
onmouseover |
script |
Action to be performed when mouse pointer moves over an element |
onmouseout |
script |
What to do when mouse pointer moves out of an element |
onmouseup |
script |
What function to carry when mouse button is released |
Keywords: xhtml tutorial, xhtml validator, html xhtml, tag com xhtml, xhtml editor, xhtml templates, xhtml 1.0, xhtml code, xhtml doctype, xhtml validation
|