随笔分类 -  javascript

javascript 对象,函数,原型和 this
摘要:1.对象 在javascript里,一切都是对象,包括函数自身(不是指具体的函数,而是指"Function"这个东东)。例如: 这时,fun1是一个函数的"实例",或者说函数对象,所以当然是一个对象。fun1.__proto__指向Function.prototype。但同时,Function也有_ 阅读全文

posted @ 2019-08-20 17:00 wyman25 阅读(394) 评论(0) 推荐(0) 编辑

关于Chrome中JS的Uncaught Error: NOT_FOUND_ERR: DOM Exception 8问题
摘要:今天使用table.removeChild(tr)去删除table下的某一行,竟然失效了。代码示例如下:<table id="tbl"><tr id="row1"><td>row1</td></tr><tr id="row2"><td>row2</td></tr><tr id="row3"><td>row3</td></tr><tr id="ro 阅读全文

posted @ 2012-10-11 21:11 wyman25 阅读(1444) 评论(0) 推荐(0) 编辑

极品javascript进阶博客教程《ECMA-262-3 in detail》读书笔记
摘要:前言: 在我看来javascript是一门非常松散灵活的语言,松散并不是贬义,而恰恰相反,是对js的一种赞美。javascript相对于c#等静态编译语言来说,就像一个骑自行车已经十分熟练的顽皮孩子,已经不再需要遵循上车必须从车右边扶车把,左脚踏踏板右脚蹬地几下的标准动作了,他可以做出若干不同的上车花式,但始终不会背离平衡这一原则。正式这样的灵活性甚至看上去有点怪异的行为令javascript与c#这些语言表现格格不入:它是面向对象,却没有类,能继承又搞出个prototype,“this”的神出鬼没难以捉摸,闭包,作用域,弱类型等概念更是让人摸不着头脑。 但是请不要忘记,我们觉得js怪异只是因 阅读全文

posted @ 2012-02-11 21:09 wyman25 阅读(1059) 评论(0) 推荐(0) 编辑

ECMA-262-3 in detail. Chapter 6. Closures.
摘要:转载地址:http://dmitrysoshnikov.com/ecmascript/chapter-6-closures/IntroductionIn this article we will talk about one of the most discussed topics related with JavaScript — aboutclosures. The topic, as a matter of fact, is not new and was discussed many times. However we will try to discuss and understan 阅读全文

posted @ 2012-02-09 18:31 wyman25 阅读(218) 评论(0) 推荐(0) 编辑

ECMA-262-3 in detail. Chapter 3. This.
摘要:转载地址:http://dmitrysoshnikov.com/ecmascript/chapter-3-this/IntroductionIn this article we will discuss one more detail directly related withexecution contexts. The topic of discussion is thethiskeyword.As the practice shows, this topic is difficult enough and often causes issues in determination ofth 阅读全文

posted @ 2012-02-09 18:24 wyman25 阅读(250) 评论(0) 推荐(0) 编辑

ECMA-262-3 in detail. Chapter 4. Scope chain.
摘要:转载地址:http://dmitrysoshnikov.com/ecmascript/chapter-4-scope-chain/IntroductionAs we already know from thesecond chapterconcerning thevariable object, the data of anexecution context(variables, function declarations, and formal parameters of functions) are stored as properties of the variables object. 阅读全文

posted @ 2012-02-09 18:20 wyman25 阅读(232) 评论(0) 推荐(0) 编辑

ECMA-262-3 in detail. Chapter 2. Variable object.
摘要:转载地址:http://dmitrysoshnikov.com/ecmascript/chapter-2-variable-object/IntroductionAlways in programs we declare functions and variables which then successfully use building our systems. But how and where the interpreter finds ourdata(functions, variable)? What occurs, when we reference to needed obje 阅读全文

posted @ 2012-02-09 18:11 wyman25 阅读(280) 评论(0) 推荐(0) 编辑

ECMA-262-3 in detail. Chapter 1. Execution Contexts.
摘要:转载地址http://dmitrysoshnikov.com/ecmascript/chapter-1-execution-contexts/IntroductionIn this note we will mention execution contexts of ECMAScript and types of executable code related with them.DefinitionsEvery time when control is transferred to ECMAScript executable code, control is entered anexecut 阅读全文

posted @ 2012-02-09 18:07 wyman25 阅读(335) 评论(0) 推荐(0) 编辑

JavaScript. The core.
摘要:转载地址:http://dmitrysoshnikov.com/ecmascript/javascript-the-core/This note is an overview and summary of the “ECMA-262-3 in detail” series. Every section contains references to the appropriate matching chapters so you can read them to get a deeper understanding.Intended audience: experienced programme 阅读全文

posted @ 2012-02-09 17:54 wyman25 阅读(188) 评论(0) 推荐(0) 编辑

我所知的javascript之prototype
摘要:一:prototype大概概念和用途“prototype”字面翻译是“原型”,是javascript实现继承的主要手段。粗略来说就是:prototype是javascript中的函数(function)的一个保留属性,并且它的值是一个对象(我们可以称这个对象为"prototype对象"),通过以此函数作为构造函数构造出来的对象都自动的拥有构造函数的prototype对象的成员属性和方法。其中的要点是:1.prototype是函数(function)的一个必备属性(书面一点的说法是"保留属性")(只要是function,就一定有一个prototype属性) 阅读全文

posted @ 2011-11-23 12:08 wyman25 阅读(295) 评论(0) 推荐(0) 编辑

导航

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5
点击右上角即可分享
微信分享提示