If you are currently using RestfulAPI and you need to use a web project to construct a json string response, this article will help you use javascript to create a json string. This is very useful. We will use the jQuery plug-in $. toJSON converts data objects... syntaxHighlighter if you are currently using Restful APIs and you need to use a web project to construct responses to json strings, this article will help you create json strings using javascript. This is very useful. We will use the jQuery plug-in $. toJSON to convert the data object to the json format. Use JavaScript to construct a JSON string JavaScript code: the javascript code is included here. $ ("# Form"). submit (function () {}-delete_button is the ID of the form tag. We call the value of the form input box through element. val. The Code is as follows:
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service