Created
May 6, 2014 01:28
-
-
Save shri/f64655cdbaf0c2076364 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script> | |
<script type="text/javascript"> | |
function kimonoCallback(data) { | |
console.log(data); | |
if(data.lastrunstatus=="success"){ | |
$("#a").text(JSON.stringify(data)); | |
}else{ | |
getRandomWords(); | |
} | |
} | |
function getRandomWords(){ | |
var url = "http://www.kimonolabs.com/api/dwrmpm04?apikey=989877be85a3ca05477428c8b41d4fbe&callback=kimonoCallback&kimpath1="; | |
var num = Math.floor(Math.random()*1000000)+3000000; | |
console.log(num); | |
url = url+num+"&kimpath2="; | |
console.log(url); | |
$.ajax({ | |
"url": url, | |
"crossDomain":true, | |
"dataType":"jsonp" | |
}); | |
} | |
</script> | |
<body> | |
<div id="a"></div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment