JSON Questions et reponses d'entretien
Question : How to Generate/Send JSON Data at the Client Side?Reponse : Create JSON JavaScript objectUse "POST" HTTP method in the open method of the XMLHttpRequest object Pass JSON JavaScript object in the send method of XMLHttpRequest object var carAsJSON = JSON.stringify(car); var url = "JSONExample?timeStamp=" + new Date().getTime(); createXMLHttpRequest(); xmlHttp.open("POST", url, true); xmlHttp.onreadystatechange = handleStateChange; xmlHttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xmlHttp.send(carAsJSON); |
Enregistrer pour revision
Ajoutez cet element aux favoris, marquez-le comme difficile ou placez-le dans un ensemble de revision.
Connectez-vous pour enregistrer des favoris, des questions difficiles et des ensembles de revision.
Est-ce utile ? Oui Non
Les plus utiles selon les utilisateurs :
- Who is the Father of JSON ?
- What is the file extension of JSON?
- What is JSON?
- Why use JSON over XML?
- Explain JSON with php.