JS实用代码收集
摘要:
1.JSON对象转换为字符串//JSON对象转字符串function jsonParseString(o) { try { if (o == undefined) { return ""; } var r = []; if (typeof o == "string") return "\"" + o.replace(/([\"\\])/g, "\\$1").replace(/(\n)/g, "\\n").replace(/(\r)/g, "\\r").re 阅读全文
posted @ 2013-12-09 09:22 kingtiger 阅读(154) 评论(0) 推荐(0) 编辑