JavaScript, at its base, is a simple language that we continue to evolve with intelligent, flexible patterns.  We've used those patterns in JavaScript frameworks which fuel our web applications today.  Lost in JavaScript framework usage, which many n…
<Professional JavaScript for Web Developers>day02 1.在HTML中使用JavaScript 1.1 <script>元素 HTML4.01为<script>定义了下列6个属性. 1)async:可选.表示应该立即下载脚本,但不应妨碍页面中的其他操作,比如下载其他资源或等待加载其他脚本.只对外部脚本文件有效. 2)charset:可选.表示通过src属性指定的代码的字符集(大多数浏览器会忽略它的值,因此这个属性很少有人用.…
<professional JavaScript for Web Developers>day01 1.JavaScript简介 1.1JavaScript简史:略 1.2JavaScript实现: 一个完整的JavaScript实现应该由下列三个不同的部分组成 a.核心(ECMAScript) 由ECMA-262定义,提供核心语言功能 b.文档对象模型(DOM) 是针对XML但经过扩展用于HTML的应用程序编程接口.DOM把整个页面映射为一个多层节点结构. 通过DOM创建的表示文档的树形图,…
<Professional JavaScript for Web Developers>day03 1.1ECMAScript语法 1.1.1 区分大小写 1.1.2 标识符 按照惯例,ECMAScript标识符采用驼峰大小写格式,也就是第一个字母小写,剩下的每个单词的首字母大写. #不能把关键字,保留字,true,false和null用作标识符. 1.1.3 注释 关注<JavaScript经典入门-day01> 1.1.4 严格模式 ECMAScript5引入了严格模式(str…
Professional JavaScript for Web Developers 4th Edition learning notes / 学习笔记 https://github.com/xgqfrms/Professional-JavaScript-for-Web-Developers-4th-Edition Chapter 8 Objects, Classes, and ObjectOriented Programming refs https://www.cnblogs.com/xgq…
JavaScript solves multiple purposes; it helps you to create interactive websites, web applications, and many more. Using JavaScript into your projects lets you move HTML elements around, create a myriad of custom animations, speedup your applications…
1. DOMContentLoaded DOM树构建完成时触发该事件 load 页面加载完毕触发 原生js document.addEventListener('DOMContentLoaded', function(){ //code..... }, false); document.addEventListener('load', function(){ //code... }, false); jquery //DOMContentLoaded $(document).ready(func…
It is a huge pitty to breaking translating this book. Sincerly speaking, I am striken by this great book in JavaScript programming. When glanced at it's chapters like chapter24, Best Practice, does it has been taken out by another one named <<JavaSc…
原文: https://blog.mrfrontend.org/2017/10/2-ways-get-child-elements-javascript/ Along the lines of other frameworks such as jQuery or Prototype, shortening the "querySelector" name can be convenient: function $ (selector, el) { if (!el) {el = docu…
我是这么理解的: (object.getName = object.getName),这条语句在执行结束后,返回的是右操作数object.getName: 但是关键是这个右操作数现在放在哪里 ?  我猜想因为这条语句是在全局中执行的,所以在全局中会有一个临时的变量,不妨命名为temp: 且temp = object.getName: 实际上temp和object.getName都指向同一个函数,这个函数的逻辑是function(){ return this.name }; 如果temp是挂靠在g…