JavaScript The composition of :

JS characteristic :
JS It's a door Scripting language : No compilation required
compile : Translate the code into the binary language recognized by the computer .
JS It's a weak type language : Declare variables with var
JS Is a dynamic language : Knowing what kind of variable is at present
JS It is an interpretive language

JS The original purpose is to solve the problem of interaction between browser and server ( Like verifying passwords )
JS What can we do now ?
Problems of interaction 、 Special effects 、 game 、 Development of server side 、 Mobile development

HTML: Display information
Css: Beautify the page
JS: Realize the interaction between browser and server , Ability to calculate and verify
Scripting language : No compilation required , Direct operation
JS What you point out may not work , Things that can't be ordered may be ()
You need to understand .... Long term process ) object
JS What should we pay attention to :
1) Variables can be declared in case ;
2) Weak type language , Declare variables with var
3) You can use single quotation marks or double quotation marks for strings (JS Single quotation marks or double quotation marks in are strings )
* Double quotation marks are recommended ( Forced to use single quotation marks .... and DOM When you combine ( and html When nesting ))
4) Use a semicolon at the end of each line of code ;

JS The comments in :
Single-line comments ://
Multiline comment :/* Content of notes */
HTML The comments in : <!-- -->
Css Notes and JS It's the same as multiple line comments in

JS Where to write the code for :
stay script Write in Tags , It can be written in html Anywhere on the page ( Generally written in the book head At the end of the label ),script There can be multiple pairs of .

JS:1) inline , Embedded in the html in
2) Internal references , Directly on the page script Write in Tags js Code
3) External reference ,js The code is put in a js In file , Let the queen html Page .
<script src=”js Path to file ”> </script>
Be careful : You can't introduce outside JS Of documents script Write the code in the tag ( Sometimes it's wrong )
If in script There is an error in the code in the tag , It's going to affect the right script The code behind the tag executes , But it won't affect the rest of the rest script Content in Tags .

Sync : One person does many things in order
asynchronous : Many people do many things

Exchange the values of two variables 1) Third party variables 2) Use addition and subtraction
3) An operation ( Exclusive or operation )

Naming conventions for variable names :

Variable declaration can declare more than one variable at a time . Var num=10, i=10;

JS Data type of :

Generally in JS in :

Var sex=1; // male
Var sex=0; // Woman

String properties : Immutability
Tab key : Indicates alignment
Other types are converted to strings :

3-14 JS Basic knowledge of 01 More articles about

  1. JS Basic knowledge of -01

    01- On the history of front end development The first stage :C/S(client server)->B/S(browser server) Web page creation Technology stack :PhotoShop.HTML.CSS The second stage : From static to dynamic , from ...

  2. NodeJs&gt;-------&gt;&gt; The third chapter :Node.js Basic knowledge of

    The third chapter :Node.js Basic knowledge of One :Node.js Console in 1:console.log.console.info  Method console.log(" node app1.js 1> ...

  3. [JS review ] JS Basic knowledge of

    End of project , free time , Also put <JS Basic knowledge of > The book went through , After reviewing the old and learning the new , Many people know what it is and don't know what it is Be suddenly enlightened . [1. Labels for ranges ] display  :inline or bloc ...

  4. HTML+CSS+JS Basic knowledge of

    HTML+CSS+JS Basic knowledge of Catalog Yes HTML+CSS+JS The understanding of the Basic knowledge of Yes HTML+CSS+JS The understanding of the Basic knowledge of Three ways to insert a style sheet External style sheets :<link rel="sty ...

  5. Node.js Basic knowledge of

    Node.js introduction   Node.js     Node.js It's a set of tools for writing high performance web servers JavaScript tool kit , A series of changes began . What's unique is ,Node.js I'll assume that POSIX Operation in environment ...

  6. Advanced website development ( 15、 ... and )JS Basic knowledge charging station

    JS Basic knowledge charging station 1.javascript alert When the dialog box pops up, confirm and cancel the two buttons to return the value ? It's not alert Dialog box , yes confirm confirm(str); Parameters str: What you have to say or ask : ...

  7. JS Basic knowledge notes

    2020-04-15 JS Basic knowledge notes // new Boolean() The value passed in is the same as if The judgment is the same var test=new Boolean(); console.log(test); // false ...

  8. CSS Basic knowledge of 01

    One .CSS Introduction to basic knowledge 1.css yes cascading style sheet Short for cascading style sheets 2.css Minor usage In bold :font-weight:bold;             Normal use :norma ...

  9. 14.ajax Basic knowledge of 、 use ajax Do the login page 、 use ajax Verify that the user name is available 、ajax Call the database dynamically

    1.ajax Basic knowledge of ajax It's a combination of jquery.php And so on , It's not new .ajax It's also written in <script> In the label . If you use ajax There must be 1 A place ...

Random recommendation

  1. JDK8 Of Lambda Expression principle

    JDK8 Use one line Lambda Expressions can replace what you've done with five or six lines of anonymous class , So how does it work ? From what we know , Anonymous classes will be generated at compile time with the host class $1, $2 Class files , As written in TestLamb ...

  2. storm actual combat : be based on storm,kafka,mysql Real time statistical system for

    Companies open multiple systems to customers , Operators want to know how customers use each system , Before that , The data platform team has built a unified Kafka News channel . In order to ensure that the architecture can meet the performance requirements after the possible expansion of the business , choose storm To deal with all kinds of problems ...

  3. spring combination Quartz Realization of cluster function based on virtual reality

    One : the front In the last article (http://www.cnblogs.com/wuhao1991/p/4331613.html) The function of timing is recorded in the blog of , But integration didn't work , In this article , I'm explaining here ” Integrated with ...

  4. SSH Framework summary ( Frame analysis + Environment building + Example source code download )

    originate : http://blog.csdn.net/shan9liang/article/details/8803989 First ,SSH It's not a framework , It's multiple frames (struts+spring+hiber ...

  5. jsViews validates( verification )

          summary :jsViews So that the front-end development process will js Code and the html Separate , Data and data integration through template html Element Association , Fill the template with data through the binding method , To render html The purpose of the element . With this method js No more in the file ...

  6. Linux command - uniq: Notify or ignore duplicate lines

    Given an ordered file ,uniq Duplicate rows are deleted and the results are output to standard output .uniq Usually with sort Combine to delete sort Duplicate lines in the output . Command format uniq [OPTION]... [INP ...

  7. 9.python object-oriented programming

    Several core features of OO are as follows Class A class is an abstraction of a class of objects with the same properties . The blueprint . Prototype . The properties of these objects are defined in the class (variables(data)). Common approach Object object One ...

  8. Binary Tree Xorder Traversal

     * Definition for a binary tree node. * public class TreeNode { * int val; * TreeNode left; * TreeN ...

  9. nodejs How to deploy smart contracts -web3 0.20 edition

    Reference resources :https://www.jianshu.com/p/7e541cd67be2 There are many ways to deploy smart contracts , For example, use truffle frame , Use remix-ide etc. , The deployment method here is to use nodejs One ...

  10. [ Re posting ]K8H3D Viruses Analysis of Tencent Royal sword

    https://weibo.com/ttarticle/p/show?id=2309404344350225132710 The eternal blue downloader Trojan horse once again upgraded the new attack ​​ background Tencent security is in Threat Intelligence ...