Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <h2>Convert a JavaScript object into a JSON string, send it to the server.</h2>
- <script>
- var myObj = { "name":"John", "age":31, "city":"New York" };
- var myJSON = JSON.stringify(myObj);
- window.location = "demo_json.php?x=" + myJSON;
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement