开发者

jQuery Object Serialization

If I've for example an object like:

{start: 1, end: 2, someString="someStringValue"}

I开发者_如何学Gos there any simple way to serialize it into a string of data? Example:

start=1&end=2&someString=someStringValue

Thanks.


You can use the param() function:

var str = jQuery.param({start: 1, end: 2, someString: "someStringValue"});
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜