摘要: 1 块级元素 address 地址 blockquote 块引用 center 居中对齐块 dir 目录列表 div dl 定义列表 fieldset -form控制组 form 交互表单 h1 h2 h3 h4 h5 h6 hr 水平分割线 isindex menu 菜单列表 ol 排序表单 p pre table ul内联元素 a 锚点 abbr acronym 首字 ado b br换行 cite引用 code计算机代码 dfn em 强调 font 字体 i 斜体 img 图片 input 输入框 label 表格标签 ... 阅读全文
posted @ 2014-03-06 21:03 菠萝君 阅读(269) 评论(0) 推荐(0)
摘要: var Dog = function(name,color){this.name=name||"";this.color=color||"";};Dog.prototype.setName = function(name){this.name = name;return this;};Dog.prototype.setColor = function(color){this.color=color;return this;};Dog.prototype.yell = function(){alert(this.name+this.color);retur 阅读全文
posted @ 2014-03-06 16:58 菠萝君 阅读(151) 评论(0) 推荐(0)
摘要: 1 理解作用域 1 我们构造一个myObject 对象,它拥有一个value属性和一个increment的方法,假定我们希望保护该值不会被非法更改 var myObject = function(){ var value = 0; return { increment:function(inc){ value +=typeof inc === "number"?inc:1; }, getValue:function(){ return value; } } }();//直接执行,返回结果 我们并... 阅读全文
posted @ 2014-03-06 15:54 菠萝君 阅读(179) 评论(0) 推荐(0)