JavaScript Realization

although JavaScript and ECMAScript It's usually used by people to express the same meaning , but JavaScript It means more than ECMA-262 It's a lot more than that . A complete JavaScript The implementation should consist of three different parts :

  • The core
  • Document object model
  • Browser object model

1 ECMAScript

from ECMA-262 Defined ECMAScript And Web The browser has no dependencies .Web The browser is just ECMAScript Implement one of the possible host environments . Host environment not only provides basic ECMAScript Realization , It also provides extensions to the language , So that language and environment can interact with each other . And these extensions —— Such as DOM, The use of ECMAScript The core types and syntax of provide more specific functions , In order to achieve the operation of the environment . Other hosting environments include Node and Adobe Flash.

ECMA-262 The standard specifies the following components of the language :

  • grammar
  • type
  • sentence
  • keyword
  • Reserved words
  • The operator
  • object

2 Document object model (DOM)

Document object model (DOM,Document Object Model) Is aimed at XML But extended to HTML Application programming interface for (API,Application Programming Interface).DOM Map the whole page to a multi-layer node structure .HTML or XML Each component of the page is a node of some kind , These nodes contain different types of data .

DOM Level

DOM1 level (DOM Level 1) And 1998 year 10 Month be W3C The recommended standard of .DOM1 The stage consists of two modules :DOM The core (DOM Core) and DOM HTML. among ,DOM The core requirement is how to map based on XML The document structure of , While simplifying access to and manipulation of any part of the document .DOM HTML The module is in DOM On the basis of the core , Added right HTML The object and method of .

DOM2 Grade in the original DOM The mouse and user interface events are expanded on the basis of 、 Range 、 Traverse ( iteration DOM Method of documentation ) And so on , And through the object interface, we add a pair of CSS(Cascading Style Sheets, Cascading style sheets ) Support for .DOM1 In class DOM The core modules have also been extended to support XML Namespace .

DOM3 The level is further extended DOM, Introduces a unified way to load and save documents —— stay DOM Load and save (DOM Load and Save) Defined in module ; A new method to verify documents is added —— stay DOM verification (DOM Validation) Defined in module .DOM3 I'm right DOM The core has expanded , Start supporting XML 1.0 standard , Design XML Infoset、XPath and XML Base.

3 Browser object model (BOM)

Used by developers BOM You can control the parts of the browser that are not displayed on the page . until HTML5 Only then BOM The function is written into the formal specification .

[ note ]《JavaScript Advanced programming 》- JavaScript More related articles in the introduction

  1. Javascript Advanced programming ——javascript brief introduction

    1.Javascript Brief history javascript Born in 1995 year , It's from Netscape Brendan Eich Developed , The original goal was to handle some input validation operations on the client side , Since then, it has become a feature of common browsers , Now the use has been ...

  2. Javascript Advanced programming ——Javascript Brief history + Use Javascript

    One .Javascipt Brief history 1. understand Javascript history Netscape(Javascript1.0).Microsoft(JScript) To JS1.1, Until then ECMA-262 standard 2. know ECM ...

  3. javascript Advanced programming reading notes ( One )

    javascript Advanced programming reading notes ( One ) Develop some after work web Application as an interest , In terms of interaction javascript and css.HTML5 Technology , So reading notes is necessary . javascript brief introduction J ...

  4. JavaScript Advanced programming ( Reading notes )( One )

    This note summarizes the author's opinion that “JavaScript Advanced programming ” The first seven chapters of this book focus on knowledge , For reference only . Chapter one JavaScript brief introduction JavaScript A brief history of development : 1995 year ,JavaScript Be born 19 ...

  5. 《JavaScript Advanced programming ( The first 3 edition )》 note - order

    I seldom read books , Don't like reading , It's mainly because I can't sit when I go to school , There's not much qualitative , A book can be read in two days , Flip freely , You can leave it in the corner for months without moving it . Last time I met <JavaScript Advanced programming ( The first 3 edition )> It really feels like ...

  6. 《JavaScript Advanced programming ( The first 3 edition )》 Read the first chapter of the summary record JavaScript brief introduction

    Preface : Why do you think of <JavaScript Advanced programming ( The first 3 edition )> The summary record , I wrote a blog before , Study the effect of rotation , Later I went to see <JavaScript Advanced programming ( The first 3 edition )&g ...

  7. 【javascript Study ——《javascript Advanced programming 》 note 】DOM operation

    DOM( Document object model ) Is aimed at HTML and XML One of the documents API( Application programming interface ).DOM Depicts a hierarchical node tree , Allow developers to add . Remove and modify . 1. Node hierarchy <html> <head& ...

  8. 《JavaScript Advanced programming 》 Reading notes -- Preface

    cause web The programming process uses javascript I feel very hard when I'm at work , Efficiency is very low . The root cause is right javascript I'm not familiar with the whole knowledge system , It seems that we need to find some books to supplement it , At the same time, welcome all netizens to supervise . The great God recommends books I read the blog recommended by the great gods ...

  9. 《JavaScript Advanced programming 》 Learning notes 12 piece

    Write it at the front : this 12 This blog post is not for people to see , It's for checking , Forget the basics , Click on the page Ctrl + F Key words are good P.S. If not found in the corresponding category , Please tell me , In order to add as soon as possible . Of course , I'll also add something missing from time to time ...

  10. 《JavaScript Advanced programming 》 Learning notes

    System learning JS, from <JavaScript Advanced programming > introduction , Through the study jQuery perhaps angularJS Source code to advance . The first 1 Chapter JavaScript brief introduction 1.JS The purpose of the invention is to deal with the problems that were previously solved by the server side ...

Random recommendation

  1. easyuidatagrid in load,reload,loadData The difference between

    Abstract :datagrid There is load,reload,loadData Those three ways , It's all about loading data , But there are differences . Let's take a look at : First ,load Method , For example, I've defined a datagrid Of id by grid ...

  2. javascript Tips : Synchronize server time 、 Synchronous countdown

    I saw a question on the Internet before , How to synchronize the time of the server on the page , In fact, there are several implementation methods , Maybe most people immediately think that they can use Ajax Request the server every second , Then the time obtained by the server is displayed on the page , Although this can be achieved , But there is one ...

  3. zepto Source code research - zepto.js (zepto.init)

    Briefly : When we use $() when , Will call zepto.init Generate zepto object , that zepto.init How to produce the specified object according to different types of parameters ? zepto.init = function(select ...

  4. php Connect mysql Summary of some of the methods

    In order to make PHP Connect MSSQL, The system needs to be installed MSSQL,PHP, And in PHP.ini In the configuration of , take        ;extension=php_mssql.dll Ahead ; Get rid of 1. Connect MSSQL       ...

  5. TP5.x—— Print SQL sentence

    operation Use fetchSql, then sql It just outputs sql Statement without executing var_dump(Db::name('user')->where(array('id'=>$this->_uid, ...

  6. Django Of csrf middleware

    csrf middleware ​ csrf Cross-site request forgery ​ Add two ornaments : ​ from django.views.decorators.csrf import csrf_exempt,csrf_protect ...

  7. [No0000150]VSVisualStudio Prompt icon , The meaning of the signal icon

    The icon on the right indicates that this is an interface type __interface( Or structure type ) The icon on the right indicates that this is a class type The icon on the right indicates that this is a .cpp file ( It seems that it can be .hpp Wait for the documents ) The icon on the right indicates that this is an enumeration class ...

  8. windows On-Site Inspection

    Reference website :   http://www.jb51.net/os/windows/525017.html The system has its own tools  : Let's talk about how to check the health of the system ,Win+R Just enter a command : perf ...

  9. luoguP1090 Combine the fruits ( greedy + Priority queue )

    Topic link :https://www.luogu.org/problemnew/show/P1090 Ideas : Typical greedy question , Obviously, it takes the least energy to choose the two smallest stacks at a time , But after each merge, we need to find the smallest two ...

  10. Codeforces1151E,F | 553Div2 | Talk nonsense about reports

    Send link E. Number of Components At that time, Sibo .. I've been thinking about \([1,r]\) The connecting block and \([1,l-1]\) The connection block of is pushed to \([l,r]\) The connection block of ... I'm really stupid .. The title is clear ...