相当于JSON.stringify的jquery [英] jquery equivalent for JSON.stringify
问题描述
可能重复:
在jQuery中序列化为JSON
Possible Duplicate:
Serializing to JSON in jQuery
我在我的JavaScript代码中将jquery用作库.但有时我必须JSON.stringify()
.
I'm using jquery as a library in my javascript code. But sometimes I have to JSON.stringify()
.
当我想保持我的代码IE兼容时,我使用
$("head").append('<script type="text/javascript" src="../Includes/json2.js"></script>');
使我的JSON.stringify()
正常工作. 在jquery
中是否没有与JSON.stringify()
等价的内容?
When I want to keep my code IE compatible I use
$("head").append('<script type="text/javascript" src="../Includes/json2.js"></script>');
to get my JSON.stringify()
to work. Isn't there a equivalent in jquery
for JSON.stringify()
?
推荐答案
jQuery中没有此类功能.使用JSON.stringify
或其他具有类似功能的jQuery插件(例如 jquery-json )
There is no such functionality in jQuery. Use JSON.stringify
or alternatively any jQuery plugin with similar functionality (e.g jquery-json).
这篇关于相当于JSON.stringify的jquery的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!