MENU service case
 Website construction website design Beijing website construction high-end website production company Shangpin China
We create by embracing change
360 ° brand value__
simplified Chinese character
Simplified Chinese English

Shangpin China Joins Hands with Beisheng Internet to Create a New Chapter in Website Construction

Type: Shangpin Dynamic Learn more

Website Production Tutorial JavaScript Client Mouse Event Driven Complete

Source: Shangpin China | Type: website encyclopedia | Date: December 12, 2015
JavaScript is an object based language. The basic characteristics of object-based Website Design Event driven. The actions of the user using the mouse or hotkey on the client side are called events, and the actions of a series of programs triggered by the mouse or hotkey are called event driven. There are mainly the following events:

Click Event (onClick)

When Marketing website construction When the user clicks the mouse button, the onClick event is generated, and the event handler specified by onClick will be called to execute. Generally, click events are applied to buttons, checkboxes, radio buttons, reset buttons, and submit buttons.

For example:
 Click Event Code


Save the above code as "onclick. htm", open it with a browser, click "Click Me", and the result is as shown in Figure 1.21.
 Click Event

Change event (onChange)

 Change Event Code
 Change event (onChange) code

Save the above code as "onchange. htm", open it with a browser, change the value of the text box, and the page prompt is shown in Figure 1.22.
 Onchange event
Once the value of the text box changes, the onChange event is triggered and the check function is executed.

Selected event (onSelect)
 Selected event code

Save the above code as "onselect. htm", open it with a browser, and select some text in the text field, as shown in Figure 1.23.

 Selected event (onSelect)


Load event (onLoad)

 Load event (onLoad) code

Save the above code as "onload. htm" and open it with a browser, as shown in Figure 1.24.

 Load event (onLoad)

The loading event is executed when you first enter the page.

Unload event (onUnload)

 Unload event (onUnload) code

Save the above code as "onunload. htm" and open it with a browser, as shown in Figure 1.25.
 Unload event (onUnload)

The unload event is executed when leaving the page.
Source Statement: This article is original or edited by Shangpin China's editors. If it needs to be reproduced, please indicate that it is from Shangpin China. The above contents (including pictures and words) are from the Internet. If there is any infringement, please contact us in time (010-60259772).
TAG label:

What if your website can increase the number of conversions and improve customer satisfaction?

Make an appointment with a professional consultant to communicate!

* Shangpin professional consultant will contact you as soon as possible

Disclaimer

Thank you very much for visiting our website. Please read all the terms of this statement carefully before you use this website.

1. Part of the content of this site comes from the network, and the copyright of some articles and pictures involved belongs to the original author. The reprint of this site is for everyone to learn and exchange, and should not be used for any commercial activities.

2. This website does not assume any form of loss or injury caused by users to themselves and others due to the use of these resources.

3. For issues not covered in this statement, please refer to relevant national laws and regulations. In case of conflict between this statement and national laws and regulations, the national laws and regulations shall prevail.

4. If it infringes your legitimate rights and interests, please contact us in time, and we will delete the relevant content at the first time!

Contact: 010-60259772
E-mail: [email protected]

Communicate with professional consultants now!

  • National Service Hotline

    400-700-4979

  • Beijing Service Hotline

    010-60259772

Please be assured to fill in the information protection
Online consultation

Disclaimer

Thank you very much for visiting our website. Please read all the terms of this statement carefully before you use this website.

1. Part of the content of this site comes from the network, and the copyright of some articles and pictures involved belongs to the original author. The reprint of this site is for everyone to learn and exchange, and should not be used for any commercial activities.

2. This website does not assume any form of loss or injury caused by users to themselves and others due to the use of these resources.

3. For issues not covered in this statement, please refer to relevant national laws and regulations. In case of conflict between this statement and national laws and regulations, the national laws and regulations shall prevail.

4. If it infringes your legitimate rights and interests, please contact us in time, and we will delete the relevant content at the first time!

Contact: 010-60259772
E-mail: [email protected]