JavaScript alert () function

Source: Internet
Author: User

Avascript alert () function

alert--Popup message dialog box (there is an OK button in the dialog box)

Alert, meaning of "reminder" in Chinese

Alert function syntax

alert (str);

alert function Hint Box illustration

  

Alert function parameters

str--the text to display in the message dialog box

Alert function Description

The Alert message dialog box is typically used for some prompt information about a user, such as when incorrect data is entered in a form.

Tip: The message dialog box is provided by the system, so style fonts may be different in different browsers.

Tip: The message dialog box is exclusive, which means that no other action can be performed until the user taps the button on the dialog box.

Tip: A message dialog box is usually available for debugging programs.

Example

    1. Alert ("hellodreamdu!");
    2. Alert (' welcometo<br/>dreamdu! ');
    3. Alert (' welcometo\ndreamdu! ');

Note the second and third example above, only the third example can be used for line breaks, refer to the ASCII Code table, and use the BR tag in HTML to not wrap.

JavaScript alert () function

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.