문제

When you serialise a form using jQuery.serialize(), the method will serialise the form fields and its values so you can submit to the server. Is there a method/function that would do the same with a javascript object instead of a form?

도움이 되었습니까?

해결책 2

You're looking for the jQuery.param function.

다른 팁

Check out JSON.stringify.

JSON.stringify({x: 5, y: 6}); // '{"x":5,"y":6}' or '{"y":6,"x":5}'
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top