Javascript
JavaScript to achieve the dynamic effect of HTML, usually called Web effects, in this website special effects column code more! So how do you add Javsscript to the HTML?
JavaScript is a client-side scripting language that works with HTML, but this is not a javsscript guide, and we look at how JavaScript is used in HTML.
JavaScript events are used like attributes of HTML tags. An event is something that occurs on an HTML element, such as when it was clicked or when the focus was lost.
<a href= "#top" >click me</a>
The events that can be used are:
onblur (used in form elements, executed when the element loses focus)
onchange (used in form elements, when something changes to be performed)
OnClick (executes when mouse clicks an element)
OnDblClick (executes when the mouse double-clicks an element)
onfocus (used in form elements, executed when the element gets focus)
OnKeyDown (performed when a key is pressed)
onkeypress (executes when a key is pressed and released)
OnKeyUp (performed when a key is released)
OnLoad (used in the body tag, when loading the page to execute)
OnMouseDown (performed when the mouse button is pressed)
OnMouseMove (executes when the mouse cursor is moved over the element)
onMouseOut (executes when the mouse cursor moves away from the element)
onMouseOver (executes when the mouse cursor moves over the element)
OnMouseUp (performed when mouse button is released)
OnReset (used in form elements, executed when form resets)
Onselect (used in form elements, executed when element is selected)
OnSubmit (used in form elements, executed when form is submitted)
OnUnload (used in the Body tab, when the page is closed)
Shout, Finish ...
Attention
Don't lose control of JavaScript. It's best to use less. A Web page that uses JavaScript has the risk of significantly reducing usability, and many things can replace it, such as the server-side scripting language PHP or ASP.