Javascript examples for JSon:JSon String
Get specific element in JSON
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript"> window.onload=( function() {//from w ww. j av a2s . com var response = {results: 123, id: 456}; var div = document.createElement("div"); div.innerHTML = "id: " + response.id + " results: " + response.results; document.getElementsByTagName("body")[0].appendChild(div); }); </script> </head> <body> </body> </html>