首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > JavaScript >

JSON(2:json.js文件使用)

2012-09-01 
JSON(二:json.js文件使用)JSON字符串:JSON对象:1、如果原型没有被增加的话则增加原型对象即if (!Object.pro

JSON(二:json.js文件使用)
     JSON字符串:


     JSON对象:

1、如果原型没有被增加的话则增加原型对象即if (!Object.prototype.toJSONString)
JSON中为JS扩充的方法有:
Example:// Parse the text. If a key contains the string 'date' then convert the value to a date.myData = text.parseJSON(function (key, value) {return key.indexOf('date') >= 0 ? new Date(value) : value;});

热点排行