1. Click Event ___ onclick
Events generated when you click the mouse button. At the same time, the event handler or code specified by onclick will be called and executed.
For example, <input type = "button" value = "Open the page" onlick = "too many open('xxxx.html ', 'newwindow', 'width = 456, height = 230, toolbar = no, menubar = no, scrollbars = yes '); ">
2. Change event ___ onchange
This event occurs when the character values in the text or textarea element change or the select Table option state changes.
For example, <textarea name = "liuyan" rows = 5 cols = 70 value = "" onchange = alert ("You added new content to the text box")>
3. Selected event ____ onselect
This event is triggered when the text in the text or textarea object is selected.
For example: <ipnut type = "text" value = "default information" onselect = alert ("text in text box selected")>
4. Obtain the focus event ____ onfocus
When you click text, textarea, and select objects, this event is generated when the cursor falls in the text box or select box.
For example: <select name = "zhengjian" onfocus = "alert (" I am the Focus ")>
5. Loss of focus events ______ onblur
The loss of the Focus event is exactly opposite to the result of obtaining the focus event. This event is triggered when the text object, textarea object, or select object no longer has the focus and exits the background.
6. file loading event ____ onload
This event is generated when the page file is loaded. onload is used to detect the cookie value when loading a page file for the first time, and assign a value to it using a variable so that it can be used by the source code. This event is a window event, however, when an event handler is specified in HTML, it is generally written in the <body> tag.
For example: <body onload = alert ("loading page, please wait...")>
7. File uninstallation event ____ onunload
In contrast to the file loading event onload, the event is triggered when the web page exits and the cookie status can be updated.
For example, <body onunload = "confirm (" are you sure you want to leave this page? ")>
- 2 pages in total:
- Previous Page
- 1
- 2
- Next Page