GET request with Callback

PHOTO EMBED

Sat Feb 26 2022 17:43:52 GMT+0000 (UTC)

Saved by @mboljar #javascript

<script>
let s = document.createElement("script");
s.src = "demo_jsonp2.php?callback=myDisplayFunction";
document.body.appendChild(s);

function myDisplayFunction(myObj) {
  document.getElementById("demo").innerHTML = myObj.name;
}
</script>
content_copyCOPY

https://www.w3schools.com/js/tryit.asp?filename