JavaScript event listeners mechanism && common events

JavaScript event listeners mechanism:

* Concept: Some components are carried out certain operations, trigger the execution of some code.

* Event: Some operations. Such as: click, double click, press the keyboard, the mouse moved

* Event Source: components. Such as: the button text input box ...

* Listener: Code.

* Registered listeners: the combination of events, event source, the listener. When an event occurs on the event source, then trigger the execution of a listener code.

* Common event:

1. Click event:

		1. onclick:单击事件
		2. ondblclick:双击事件

2. Focus Events

		1. onblur:失去焦点
		2. onfocus:元素获得焦点。

3. Load event:

		1. onload:一张页面或一幅图像完成加载。

4. mouse events:

		1. onmousedown	鼠标按钮被按下。
		2. onmouseup	鼠标按键被松开。
		3. onmousemove	鼠标被移动。
		4. onmouseover	鼠标移到某元素之上。
		5. onmouseout	鼠标从某元素移开。

5. keyboard events:

		1. onkeydown	某个键盘按键被按下。	
		2. onkeyup		某个键盘按键被松开。
		3. onkeypress	某个键盘按键被按下并松开。

6. Select and change

		1. onchange	域的内容被改变。
		2. onselect	文本被选中。

7. The form events:

		1. onsubmit	确认按钮被点击。
		2. onreset	重置按钮被点击。
Published 34 original articles · won praise 31 · views 8843

Guess you like

Origin blog.csdn.net/qq_43230007/article/details/104218813