Home  >  Article  >  Web Front-end  >  JavaScript basic knowledge points learning summary

JavaScript basic knowledge points learning summary

巴扎黑
巴扎黑Original
2017-08-04 14:25:151874browse

JavaScript is a scripting language for the Internet! Used by millions of web pages to improve design, validate forms, detect browsers, create cookies, and more.

Now we will introduce a summary of the knowledge points that need to be learned to learn JavaScript.

1. Clarify the basic purpose of learning javascript.

To master the basic concepts, syntax, loops, functions, events, etc. of JavaScript.

var o = {
    name: 'Jack',
    age: 20,
    city: 'Beijing'
};
for (var key in o) {
    alert(key); // 'name', 'age', 'city'
}

http://www.php.cn/code/596.html

2. Understand the basic concepts of javascript

JavaScript a Literal scripting language is a dynamically typed, weakly typed, prototype-based language with built-in support for types. Its interpreter is called the JavaScript engine, which is part of the browser and is widely used in client-side scripting languages. It was first used on HTML (an application under Standard Universal Markup Language) web pages to add dynamic functions to HTML web pages. .

http://www.php.cn/code/687.html

3. Basic syntax learning and mastery of javascript

<html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
 <title>php.cn</title>
 <script>
 var a = 1;
 var b = 1;
 document.write(++a);
 document.write("<hr>")
 document.write(b++);
 </script>
 </head>
 <body>
 </body>
</html>
<html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
 <title>php.cn</title>
 <script>
 var sum = 0; 
 for(var i=1;i<=100;i++){
 if(i%10==0){
 sum+=i;
 }
 }
 document.write("100以内能被10整除的数之和为:"+sum)
 </script>
 </head>
 <body>
 </body>
</html>

http://www.php.cn/course/18.html

4. Mastering common JavaScript events

<html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
 <title>php.cn</title>
 <script>
 function fun1(){
 window.alert("欢迎来到php.cn")
 } 
 function fun2(){
 window.alert("你看,你还是点了我")
 }
 </script>
 </head>
 <body>
 <form>
 <input name="点我看看" type="button" value="点我看看" onclick="fun1()"/>
 <p onclick="fun2()">不要点我</p>
 </form>
 </body>
</html>

http://www. php.cn/code/873.html

5. Do some small examples to become familiar with JavaScript

http://www.php.cn/course/169. html

http://www.php.cn/course/152.html

The above is the detailed content of JavaScript basic knowledge points learning summary. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn