JS's scripting language

Source: Internet
Author: User
Tags float double true true

JS scripting language full JavaScript in the Web page using the scripting language;
Category: 1. Embed the page inside 2. On the outside
Script tags can be written anywhere on the page, but are generally written at the bottom of the page;
<script type= "Text/javascript" ></script> stands for this is a script;
Two. Comment syntax
Comments on style Sheets: single-line comments//representations, multiline comments/**/can annotate multiline text;

<!----> is a comment on the Web page;
Three. Classification of data types:
1. Integral type (data for storing integers) is represented by int;
2.flioat (single-precision fractional) short
3.double (double decimal) Long value
4.decimal (length of custom decimals)
5. Character type Char
6.string string multiple character groups grouped together called strings
7. Date and Time type Detetime (date and time of deposit)
8. Boolean bool (True true false) 0,1 can be
9, Object Type objects
10, Binary Binarg
Four. Categories in all languages:
1. Strong type: representative {C + +, C #, Java ..... }
2. Weak type: The representative of {js, php .... }
You need to be aware of the type of data when using strong typing;
No need to pay attention to the type of data when using weak types
Five. Definition of a variable
1. How to define a strongly typed language: int A in front plus type represents what type
Definition of type language for 2.js: var (mixed type) A (variable name) all variables in the defined

Time to use Var to begin;
Six. Variable assignment:
var a=10, var a=5; All variables must first be defined in use;
Seven. Output language
Alert (what to output) This code is output syntax in the form of a pop-up window
Comfirm () The content to be prompted in parentheses is a pop-up window for the selection effect
Eight. Storage of variables (heap station)
1. Underlying language (c + + is the control hardware used to deal with hardware)
2.js, Java does not control hardware, higher-level
Station space: The regularity is strong, the order is a relatively small storage space;
Heap space: is a relatively messy and relatively large storage space;
The C + + language requires handwritten code to control
Nine. Reference type
It's more cumbersome to store in the heap.
String Object
Value type: float double int
address int A (address) =10
String S=hello

JS's scripting language

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.