摘要:
书上有说4中调用方式:方法调用模式函数调用模式构造器调用模式apply调用模式下面我们来看看一些实例更好理解。1:方法调用模式。请注意this此时指向myobject。/*方法调用模式*/ var myobject={ value:0, inc:function(){ alert(this.valu... 阅读全文
摘要:
首先定义一个变量便于下面测试:var str = "xx351223441";substring:str.substring(form,to):从字符串里截取下标为form到下标为to的字符串(不包括to对应的字符)alert(str.substring(2,6)) // 3512当form>to... 阅读全文