摘要: 1.一个简单的代码function s(names){this.name=names;this.showname=functoin(){ alert(this.name);}} //工厂方式new s("张三").showname(); // 函数中 'this' 的理解2.面向对象的定义、特点、对... 阅读全文
posted @ 2015-06-11 15:42 8832A45C866CDB7D 阅读(138) 评论(0) 推荐(0) 编辑
摘要: 一、常见的字符串处理函数// 返回字符的长度,一个中文算2个String.prototype.ChineseLength = function() { return this.replace(/[^\x00-\xff]/g, "**").length;}// 去掉字符串两端的空白字符String.p... 阅读全文
posted @ 2015-06-11 11:15 8832A45C866CDB7D 阅读(136) 评论(0) 推荐(0) 编辑