Basics of JavaScript Getting Started tutorial

Source: Internet
Author: User

B Station av9243452 a series of videos, suitable for people who have learned other programming languages, it's pretty good.

A total of 43 sections, the essay is 1~16 festival

JS Introduction

To use an external file, set the. js file in the "src" attribute of the <script> tag

<script src= "Js/jquery.min.js" ></script><script src= "Bootstrap/js/bootstrap.min.js" ></ Script>

Manipulating HTML elements, such as accessing an HTML element from JavaScript, you can use the document.getElementById (ID) method

        

document.getElementById (' title '). innerhtml= ' Yinghualuowu ' </script>

JS syntax

Variable

JavaScript arrays can also be used with the new Array ()

Operator

All know, only say a ' = = = ' is congruent (value and type), plus the + number is also used for string concatenation

  var  i=10;             var  j=10;            document.write (i  ===j); document.write ( ' <br> '  var n=10;             var  m= '  ===m);            document.write ( ' <br> ' );             var  x=4,y= '  ===y); document.write ( ' <br> '); 
true false false

Conditional statements

If...else and switch

            var i;             Switch (i) {                Case 1:                    break;                  default :                      Break ;            }

Looping statements

I know all about it. A for/in loop iterates over the properties of an object

            var arr=[' A ', ' B ', ' C '];              for inch arr) {                document.write (Arr[i]+ ' <br> ');            }
Abc

Jump statement

Continue and break

Function

The rest of the knowledge is the same as other programming languages.

Basics of JavaScript Getting Started tutorial

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.