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"});
精彩评论