User:Chris G/test.js

xmlhttp=new XMLHttpRequest; xmlhttp.open("GET","/w/api.php?action=query&prop=info&titles=Main%20Page&intoken=edit&format=json",false); xmlhttp.send; document.getElementById("myDiv").innerHTML=xmlhttp.responseText;