分类目录:JavaScript技术编程

JavaScript技术编程,jquery,extjs,jqueryui,js编程

(11)鸭式辩型(chapter 9)

Duck-Typing None of the techniques described above for determining the class of an object are problem-free, at least in client-side JavaScript. An alternative is to sidestep the issue:instead of asking “what is the class of this object?” we ask instead, “what can this object do?” This approach to ……