[Core Javascirpt] Basic Metaprogramming: Dynamic Method
SomehowitlookslikereflectinJava.Forexample:WedefineanmothodontheObject,itcalleddefineMethod().Itacceptstwoarguements,oneismethodNameandotherismethodBo...
javascirpt怎样模仿块级作用域(js高程笔记)
因为javascript没有块级作用域的概念,所以在块语句中定义的变量,实际上是在包括函数中而非语句中创建的。如:functionoutputNumbers(count){for(vari=0;i<count;i++){alert(i);}alert(i);}这个函数中定义了一个for循环,而...
javascirpt对象运用与JS变量
abcdefghijklmnopqrstuvwyzString对象方法charAt()方法可返回指定位置的字符。stringObject.charAt(index)(index从0开始)【http://www.w3school.com.cn/jsref/jsref_charAt.asp】indexO...