<!DOCTYPE html> <html> <head> <script> function showCategories(){ var url="http://www.godoro.com/front-end/CategoryList.php"; var http = new XMLHttpRequest(); http.onreadystatechange = function() { if (http.readyState == 4 && http.status == 200) { var jsonObject=JSON.parse(http.responseText); showTable(jsonObject); } }; http.open("GET", url, true); http.send(); } function showTable(jsonObject){ var tableHtml=""; for(i=0;i<jsonObject.categories.length;i++){ tableHtml+="<tr>"; tableHtml+="<td>"+jsonObject.categories[i].categoryId+"</td>"; tableHtml+="<td>"+jsonObject.categories[i].categoryName+"</td>"; tableHtml+="<td>"+jsonObject.categories[i].categoryAbstract+"</td>"; tableHtml+="</tr>"; } var categoryTable=document.getElementById("categoryTable"); categoryTable.innerHTML=tableHtml; } </script> </head> <body onload="showCategories()"> <h1>JSON Edinme �rne�i</h1> <table id="categoryTable" border="1"> </table> </body> </html>Dosyayı İndir