摘要:
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title></title></head><body><script>console.log(Object.prototype); //[object Object] { .. 阅读全文
摘要:
字面量也称为直接量var obj = {}; //创建对象字面量,无任何属性和方法;属性和方法可任意增加:obj.name = "myname"; obj.dowhat=function(){...};var obj = {name:"myname", dowhat:function(){...}}; //创建对象字面量, 包括属性和方法var jsonStr='{"name":"myname","dowhat":function(){alert("ok");}} 阅读全文