<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>
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter