国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

What are events in JavaScript

The concept of events


Events: refer to some specific interactive moments that occur in a document or browser window . We can schedule events through listeners (or handlers) so that the corresponding code can be executed when the event occurs.


Event handler


Event handler: Our user's click action on the page, mouse movement action, web page loading action, etc. can all be called event names, that is: onclick, mousemove, load, etc. The name of the event. The function that responds to an event is called an event handler, or an event listener.

The following is a list of attributes that can be inserted into HTML tags to define event actions.

6.png

Let’s introduce the commonly used events in detail

Continuing Learning
||
<!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>php.cn</title> <script> function fun(){ window.alert("歡迎來(lái)到php.cn") } </script> </head> <body> <form> <input name="點(diǎn)我看看" type="button" value="點(diǎn)我看看" onclick="fun()"/> </form> </body> </html>
submitReset Code