Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

JSON HTML

const dbParam = JSON.stringify({table:"customers",limit:20});
const xmlhttp = new XMLHttpRequest();
xmlhttp.onload = function() {
  myObj = JSON.parse(this.responseText);
  let text = "<table border='1'>"
  for (let x in myObj) {
    text += "<tr><td>" + myObj[x].name + "</td></tr>";
  }
  text += "</table>"
  document.getElementById("demo").innerHTML = text;
}
xmlhttp.open("POST", "json_demo_html_table.php");
xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xmlhttp.send("x=" + dbParam);
Comment

PREVIOUS NEXT
Code Example
Javascript :: slide js 
Javascript :: spread operator in js 
Javascript :: onclick call function react 
Javascript :: for ... of ... 
Javascript :: why we use react js 
Javascript :: javascript unicode 
Javascript :: javascript dom methods 
Javascript :: copy to clipboard jquery 
Javascript :: ng2-tel-input phone number code 
Javascript :: js filter array 
Javascript :: slice in js 
Javascript :: how to add comment in javascript 
Javascript :: selecting multiple feilds using populate in mongoose 
Javascript :: javascript get width of image 
Javascript :: could not find react-redux context value; please ensure the component is wrapped in a <Provider 
Javascript :: remove second last element from array javascript 
Javascript :: Check Whether Variable Is String Or Number In JavaScript 
Javascript :: resolvers in angular 
Javascript :: terjemahan 
Javascript :: jquery get element attribute 
Javascript :: redux form 
Javascript :: stripe stripe js 
Javascript :: request module nodejs 
Javascript :: array concat 
Javascript :: discord.js reply to message author 
Javascript :: vuetify select array 
Javascript :: rgba to hex 
Javascript :: jquery dynamic row number not working properly 
Javascript :: js catch errors on listeners 
Javascript :: leaflet-src.js?e11e:4066 Uncaught (in promise) Error: Map container not found 
ADD CONTENT
Topic
Content
Source link
Name
4+3 =