JS Basic Learning Notes (vi)

Source: Internet
Author: User

Events (behaviors that can be detected by JavaScript)

Main Event Table:

Load event (onload)

The event occurs immediately after the page is loaded and executes the called program.

Unload Event (OnUnload)

When the user exits the page (page close, page refresh, and so on), the OnUnload event is triggered and the called program is executed.

Note: different browsers have different support for onunload events.

Gets or sets the value of the element

document.getElementById (' id '). Value Gets or sets the value of the ID name.

parseint () function

Parses a string and returns an integer.

Syntax: parseint (string, radix)

Parameters Description
String Necessary. The string to be parsed.
Radix

Optional. Represents the cardinality of the number to parse. The value is between 2 and 36.

If this argument is omitted or its value is 0, the number is parsed based on 10. If it starts with "0x" or "0X", it will have a base of 16.

If the parameter is less than 2 or greater than 36, parseint () returns NaN.

* The addition of ' + ' JS may be stacked in string form.

JS Basic Learning Notes (vi)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.