JavaScript Learning Summary (for novice reference) _javascript tips

Source: Internet
Author: User
constants: JavaScript constants, also called Literal constants, are the information that is solidified in program code.
variables: The main function of a variable is to access data, providing a container for accessing information.
Data type
Integral type: integer constant is a number, can be decimal, octal, hexadecimal.
String: A string is one or more characters enclosed in English "or".
Boolean: Boolean constants are logical "true" and "false".
Null value: In JavaScript, "null" means nothing.
pop-up alert box:alert
Pop-up Confirmation "Yes/No" dialog box:confirm
output to page content:document.write
get built-in objects: dateobj=new Date ();
theyear= dateobj . GetYear ();
Common methods for JavaScript Date objects
Method Description
GetDate () Return date value (1-31)
Getday () Return week value (0-6)
GetHours () Return hour value (0-23)
Getminutes () Return minutes value (0-59)
Getseconds () Return second value (0-59)
GetMonth () Return month value (0-11)
getFullYear () Returns the year with a value of 4 digits
GetTime () Returns the number of milliseconds since (1970 01 01)
Related Article

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.