摘要: <!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title></title></head><body><script>console.log(Object.prototype); //[object Object] { .. 阅读全文
posted @ 2011-12-05 17:28 Yu 阅读(225) 评论(0) 推荐(0) 编辑
摘要: 字面量也称为直接量var obj = {}; //创建对象字面量,无任何属性和方法;属性和方法可任意增加:obj.name = "myname"; obj.dowhat=function(){...};var obj = {name:"myname", dowhat:function(){...}}; //创建对象字面量, 包括属性和方法var jsonStr='{"name":"myname","dowhat":function(){alert("ok");}}&# 阅读全文
posted @ 2011-12-05 17:22 Yu 阅读(486) 评论(0) 推荐(1) 编辑