摘要: var $ = $ || {};/** * 将JS对象序列化为JSON字符串 * @param {Mixed} o The variable to decode * @return {String} The JSON string * String json = $.encode(o); */ $.encode = (function() { if ( typeof(JSON)!=='undefined' && typeof(JSON.stringify)!=='undefined') { return JSON.stringify; } var 阅读全文
posted @ 2013-09-16 15:36 relucent 阅读(1251) 评论(0) 推荐(0) 编辑