Met JavaScript

Web Set:

https://developer.mozilla.org/en-US/

1.DataType

Number;

String;

Boolean;

null(object);

undefined;

typeof : To find what the datatype of variables;

2.operators: + - * /;+= -= *= /=;++ --

Ternary operator    a == b ?  :

3.Array;

In javascript  objects have properties and methods;

Propeties are pieces of meta information about the object we can retrieve and use;

Methods are functions that belong to that object.

Array Function:

leng;  join();   push();  shift();  pop();  unshift();  reverse();  slice();

4.Functions

Functions are min programs inside our script.

Three Function:

named Functions: which are excuted when called by name;

anonymous functions: which typically run once they are triggered by a specific event.

Immediately invoked function expressions: which run the moment the browser encounters them.

5.BOM(Brower Object Model)

window.open();window.innerWith;window.outerWidth;

Window is the top-level object in the BOM, and it has a ton of properties and methods you can use to interact with

browser itself and what it displays.

DOM(Document Object Model) is the model of the document that forms the current webpage.

Document is one of the properties in the window object.which contains the current HTML document.

To get the document object you can call window.document.

document.querySelector()

document.querySelectorAll()

6.Adding New Dom Elements

A.create the element.

B.create the Text Node that goes inside the element.

C.Add the Text Node


**************importants*************

var c = 5 - "3" => c = 2

var a = 5, b = 5;  a==b is true; a === b  is false;

var color= ["blue","red"]; color.shift() => "blue"; color=["red"]

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • 温柔而坚定 文/菜包包 前段时间,偶然看到了樊登老师推荐的几本育儿的书。读完后我的育儿观出现了翻天覆地的改变,我平...
    烟火文苑菜包包阅读 673评论 0 1
  • 或许有一天我们终将老去。背岁月嘲笑的不成样子,但回首过去时却总是微笑着开始以泪落幕。往事,能留在回忆里的,能被记起...
    洛尘lc阅读 257评论 0 2
  • Android 应用运行在 Java 虚拟机上,每打开一个 Android app 都会打开一个独立的虚拟机。运行...
    xiaoyanger阅读 936评论 2 14
  • 在宽阔的教室里坐着 慵懒的看着课本上的题 思绪却还停留在两天前 11月28号 莫大人的全国畅聊会 济南站 去观看畅...
    嗯我爱吃肉阅读 251评论 0 0