This morning the weather was not good, moderate rain. Wuhan thief serious traffic jam, it rains more serious. Software Park Road under the bridge do not want to Tucao. These factors all contribute to today also eaten breakfast late ...
Well - to sort out what today's knowledge pair of
<! DOCTYPE HTML>
<HTML>
<head>
<Meta charset = "UTF-8">
<title> </ title> </ head> <body> <-! JavaScript scripting language to parse and executed by the browser weak strong type 1. type weakly typed variable is defined is not required when the declared data type, the data type is a variable value determined JavaScript strongly typed variable is defined when it has the data to determine the type of the Java int a 2 explain line execution 3. interpreted language corresponding to the language compiler python c / c ++
Translation of a full translation look a good look at
the efficiency interpreted <compiled will all be resolved to 010101 010101 the JavaScript using the line 1. The wording handle 2. Internal stylesheet <script> js Code </ Script> 3. Waibuyangshibiao < script src = "file to the end of the path js .js"> </ Script> 4. external introducing foreign import module style writing time css is on the inside of the head writing JavaScript can be placed anywhere preferably on the bottom of the page except in exceptional circumstances -> <Script> // JavaScript code is part of the basic core syntax // // variables: the amount will become
// define variables
// var keyword to define variables of
// var variable name = variable value;
naming rules // variable name: only letters, numbers, _, $ can not start with a number, not a keyword and JavaScript reserved words
// in a JavaScript is strictly case sensitive.
// var B2
// var B2
// var a = 123; // in a programming language, a = number for assignment, determination indicates two ==
@ data type
// raw data type
// number string Boolean undefined null
// null undefined number of Boolean string
// reference data types
// Object Object var a = 10; // definition of a variable, the variable value of 10 var b = 4; //
var c = "10"; // definition of a variable value string (enclosed in single or double quotes the content inside can not be mixed with writing, must correspond.),
var = D to true; // Boolean
var e = false; // Boolean
var f; // declare a variable, but no assignment
var g = null; // placeholder object, if written to a null placeholder object
var h = "Hello World !!!"
// JavaScript the operational
// add
// console.log (1000);. // in JavaScript can be read as "a."
The console.log // ( "Hello World");
// the console.log (C);
// the console.log (D);
// the console.log (A);
// the console.log (C);
// the console.log (D)
// the console.log (F); the console.log (A + B);
the console.log (A + C); 1010 // String
the console.log (B + C); 210 // String
the console.log (A + D); // Number. 11
the console.log (C + D); // String 10true
the console.log (A + F); // Number NaN3
the console.log (C + F); // String 10undefined
the console.log (A + G); // Number 10
the console.log (G + C); string 10null //
// 1. any type with string concatenation, is string concatenation
// 2. digital and Boolean type, an implicit conversion. true convert 1.false converted into 0
// 3. digital type and type of operation is not (except string, Boolean). NAN unsuccessful addition occurs
// NAN (not a number) is not a number, but it is attributed to the type number // () performs symbol, there are functions (methods) that may be performed // browser to execute JavaScript code
// open a Web page, press F12 to open the Developer Tools to find the console (console) option in it..
// minus
// 1. Can cut would reduce, not subtraction NaN
// 2. energy subtraction: Istanbul, when a string special time (all numeric string when)
the console.log (ab &);
the console.log (AC);
the console.log (AD);
the console.log (CD);
the console.log (AF) ;
the console.log (AH);
// by
// reference subtraction
// other
// reference subtraction
the console.log (a / B); //2.5
// data type: floating-shaping and no concept here is only numeric argument
// I
// Referring subtractor </ Script> </ body> </ HTML>