码迷,mamicode.com
首页 > Web开发 > 详细

JS-Object and Property的删除用法

时间:2015-08-11 17:55:40      阅读:124      评论:0      收藏:0      [点我收藏+]

标签:

在JS中,Object和Property的删除用法:

 1 var myObject = {name:‘jimmy‘, age:12, height:123}
2 delete myObject["jimmy"];
3 delete myObject.age;
4 with (myObject) { 5 delete height; 6 } 7 8 // and an object 9 var myObject = new Object(); 10 delete myObject; 11 12 var myObj2 = {}; 13 myObj2 = null;

 

JS-Object and Property的删除用法

标签:

原文地址:http://www.cnblogs.com/tx8899/p/4721246.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!