PASTEBIN
| #1 paste tool since 2002
create new paste
tools
api
archive
faq
PASTEBIN
create new paste
trending pastes
sign up
login
my alerts
my settings
my profile
Don't like ads?
PRO users
don't see any ads ;-)
Public Pastes
Untitled
8 sec ago
Untitled
11 sec ago
Untitled
13 sec ago
Untitled
Bash | 15 sec ago
ot
18 sec ago
Untitled
19 sec ago
Untitled
21 sec ago
ser_1369503561590
23 sec ago
Untitled
By: a guest on
Jul 22nd, 2012
| syntax:
JavaScript
| size: 6.31 KB | hits: 19 | expires: Never
download
|
raw
|
embed
|
report abuse
|
print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
<html>
<head>
<script language="JavaScript" type="text/javascript">
function getWord()
{
rand=Math.floor(Math.random()*(length));
insert = wordArray[rand][0];
document.getElementById("word").innerHTML=insert;
getChoices(rand);
}
function getRandom(rand) {
var rVal = Math.floor(Math.random()*(length));
if (rVal==rand)
getRandom(rand);
else
return rVal;
}
function getChoices(rand)
{
ansRand = Math.floor(Math.random()*6);
var choices;
for (x=0; x<6; x++) {
var choice=(x==ansRand)?rand:getRandom(rand);
choices = choices + "<option value=\"" + x + "\">" + wordArray[choice][1] + "</option>";
}
document.getElementById("choiceDrop").innerHTML=choices;
}
function checkAnswer()
{
var x=document.forms["problem"]["answer"].value;
var ans=wordArray[rand][1];
if (x==ansRand){
alert("Correct! \n" + insert + " = " + ans + ".");
rand = "";
ansRand = "";
choice = "";
choices = "";
insert ="";
getWord();
return;
}
}
var wordArray = [
["abrograte","abolish"],
["recline","lie down"],
["abeyance","suspended action"],
["haughtiness","arrogance"],
["euthanasia","mercy killing"],
["diffidence","shyness"],
["abase","humiliate"],
["accoutre","equip"],
["loll","lounge about"],
["eschew","avoid"],
["emancipate","set free"],
["abhor","detest"],
["perfidious","basely false"],
["diabolical","devilish"],
["hubbub","confused uproar"],
["Occident","the West"],
["adipose","fatty"],
["travail","painful labor"],
["saturnine","morose; gloomy"],
["suavity","urbanity; polish"],
["regale","entertain"],
["perimeter","outer boundary"],
["credo","creed; beliefs"],
["decant","pour off gently"],
["accelerate","move faster"],
["truncate","cut the top off"],
["dilate","expand"],
["physiognomy","face"],
["oblivion","forgetfulness"],
["psychosis","mental disorder"],
["amicable","friendly"],
["schism","division; split"],
["tatterdemalion","ragged fellow"],
["tertiary","third"],
["ensue","follow"],
["adept","expert at"],
["turncoat","traitor"],
["delete","erase"],
["adhere","stick fast to"],
["anthropod","manlike"],
["palpitate","throb"],
["arrogance","haughtiness"],
["witless","foolish"],
["gloaming","twilight"],
["lascivious","lustful"],
["derelict","abandoned"],
["tepid","lukewarm"],
["sundry","various, several"],
["ancestry","family descent"],
["bard","poet"],
["censure","blame; criticize"],
["conciliate","pacify; win over"],
["verdant","green; fresh"],
["hauter","haughtiness"],
["interim","meantime"],
["retraction","withdrawl"],
["gaunt","thin"],
["emaciated","thin; wasted"],
["infallible","unerring"],
["bootless","useless"],
["odorous","having an odor"],
["fledgling","inexperienced"],
["fetter","shackle"],
["definitive","final"],
["conjecture","surmise; guess"],
["citadel","fortress"],
["cortege","procession"],
["affray","public brawl"],
["psyche","soul; mind"],
["fancied","imagined"],
["unsullied","untarnished"],
["aspiration","noble ambition"],
["protrude","stick out"],
["mimicry","imitation"],
["abash","embarrass"],
["exigency","urgent situation"],
["amnesia","loss of memory"],
["machinations","schemes"],
["remiss","negligent"],
["exchequer","treasury"],
["celestial","heavenly"],
["analogous","comparable"],
["portly","stately; stout"],
["hogshead","large barrel"],
["pedigree","ancestry; lineage"],
["impregnable","invulnerable"],
["misgivings","doubts"],
["animated","lively"],
["amulet","charm"],
["anathema","solemn curse"],
["admonition","warning"],
["acumen","mental keenness"],
["animadversion","critical remark"],
["fervid","passionate"],
["ardent","passionate"],
["jubilation","rejoicing"],
["meretricious","flashy"],
["tawdry","flashy"],
["abrogate","abolish"],
["inter","bury"],
["ablution","washing"],
["unwonted","unaccustomed"],
["insipid","tasteless"],
["lucent","shining"],
["vacuous","empty"],
["inane","empty"],
["wily","cunning; artful"],
["commensurate","equal in extent"],
["abominate","loathe: hate"],
["gingerly","very carefully"],
["impious","irreverent"],
["annul","make void"],
["finesse","delicate skill"],
["dappled","spotted"],
["lank","long and thin"],
["evince","show clearly"],
["swill","drink greedily"],
["interdict","prohibit; forbid"],
["expunge","cancel; remove"],
["vestige","trace; remains"],
["reprove","express severe disapproval"],
["censure","express severe disapproval"],
["rebuke","express severe disapproval"],
["lithe","flexible; supple"],
["depreciate","lessen in value"],
["immaculate","pure; spotless"],
["brusque","blunt; abrupt"],
["valetudinarian","invalid"],
["foster","rear; encourage"],
["paucity","scarcity"],
["frolicsome","prankish; gay"],
["turpitude","depravity; meanness"],
["shackle","fester; chain"],
["astute","shrewd; wise"],
["disheveled","untidy"],
["ominous","threatening"],
["abash","embarrass"],
["irrevocable","unalterable"],
["swindler","cheater"],
["convoke","call together"],
["abeyance","suspended action"],
["indefatigable","tireless"],
["histrionic","theatrical"],
["accede","agree"],
["virile","manly"],
["reek","emit odor"],
["badger","pester; annoy"],
["salubrious","healthful"],
["extol","praise; glorify"],
["incommodious","not spacious"],
["accord","agreement"],
["eminent","high; lofty"],
["fiat","command"]
];
length = wordArray.length;
</script>
</head>
<body>
<form name="problem" method="post">
<span id="word"></span>
<select name="answer" id="choiceDrop">
</select>
<input type="button" value="check" onclick="checkAnswer()">
</form>
<
script type
=
"text/javascript"
>
getWord
(
)
;
</
script
>
</body>
</html>
create a
new version
of this paste
RAW Paste Data
<html> <head> <script language="JavaScript" type="text/javascript"> function getWord() { rand=Math.floor(Math.random()*(length)); insert = wordArray[rand][0]; document.getElementById("word").innerHTML=insert; getChoices(rand); } function getRandom(rand) { var rVal = Math.floor(Math.random()*(length)); if (rVal==rand) getRandom(rand); else return rVal; } function getChoices(rand) { ansRand = Math.floor(Math.random()*6); var choices; for (x=0; x<6; x++) { var choice=(x==ansRand)?rand:getRandom(rand); choices = choices + "<option value=\"" + x + "\">" + wordArray[choice][1] + "</option>"; } document.getElementById("choiceDrop").innerHTML=choices; } function checkAnswer() { var x=document.forms["problem"]["answer"].value; var ans=wordArray[rand][1]; if (x==ansRand){ alert("Correct! \n" + insert + " = " + ans + "."); rand = ""; ansRand = ""; choice = ""; choices = ""; insert =""; getWord(); return; } } var wordArray = [ ["abrograte","abolish"], ["recline","lie down"], ["abeyance","suspended action"], ["haughtiness","arrogance"], ["euthanasia","mercy killing"], ["diffidence","shyness"], ["abase","humiliate"], ["accoutre","equip"], ["loll","lounge about"], ["eschew","avoid"], ["emancipate","set free"], ["abhor","detest"], ["perfidious","basely false"], ["diabolical","devilish"], ["hubbub","confused uproar"], ["Occident","the West"], ["adipose","fatty"], ["travail","painful labor"], ["saturnine","morose; gloomy"], ["suavity","urbanity; polish"], ["regale","entertain"], ["perimeter","outer boundary"], ["credo","creed; beliefs"], ["decant","pour off gently"], ["accelerate","move faster"], ["truncate","cut the top off"], ["dilate","expand"], ["physiognomy","face"], ["oblivion","forgetfulness"], ["psychosis","mental disorder"], ["amicable","friendly"], ["schism","division; split"], ["tatterdemalion","ragged fellow"], ["tertiary","third"], ["ensue","follow"], ["adept","expert at"], ["turncoat","traitor"], ["delete","erase"], ["adhere","stick fast to"], ["anthropod","manlike"], ["palpitate","throb"], ["arrogance","haughtiness"], ["witless","foolish"], ["gloaming","twilight"], ["lascivious","lustful"], ["derelict","abandoned"], ["tepid","lukewarm"], ["sundry","various, several"], ["ancestry","family descent"], ["bard","poet"], ["censure","blame; criticize"], ["conciliate","pacify; win over"], ["verdant","green; fresh"], ["hauter","haughtiness"], ["interim","meantime"], ["retraction","withdrawl"], ["gaunt","thin"], ["emaciated","thin; wasted"], ["infallible","unerring"], ["bootless","useless"], ["odorous","having an odor"], ["fledgling","inexperienced"], ["fetter","shackle"], ["definitive","final"], ["conjecture","surmise; guess"], ["citadel","fortress"], ["cortege","procession"], ["affray","public brawl"], ["psyche","soul; mind"], ["fancied","imagined"], ["unsullied","untarnished"], ["aspiration","noble ambition"], ["protrude","stick out"], ["mimicry","imitation"], ["abash","embarrass"], ["exigency","urgent situation"], ["amnesia","loss of memory"], ["machinations","schemes"], ["remiss","negligent"], ["exchequer","treasury"], ["celestial","heavenly"], ["analogous","comparable"], ["portly","stately; stout"], ["hogshead","large barrel"], ["pedigree","ancestry; lineage"], ["impregnable","invulnerable"], ["misgivings","doubts"], ["animated","lively"], ["amulet","charm"], ["anathema","solemn curse"], ["admonition","warning"], ["acumen","mental keenness"], ["animadversion","critical remark"], ["fervid","passionate"], ["ardent","passionate"], ["jubilation","rejoicing"], ["meretricious","flashy"], ["tawdry","flashy"], ["abrogate","abolish"], ["inter","bury"], ["ablution","washing"], ["unwonted","unaccustomed"], ["insipid","tasteless"], ["lucent","shining"], ["vacuous","empty"], ["inane","empty"], ["wily","cunning; artful"], ["commensurate","equal in extent"], ["abominate","loathe: hate"], ["gingerly","very carefully"], ["impious","irreverent"], ["annul","make void"], ["finesse","delicate skill"], ["dappled","spotted"], ["lank","long and thin"], ["evince","show clearly"], ["swill","drink greedily"], ["interdict","prohibit; forbid"], ["expunge","cancel; remove"], ["vestige","trace; remains"], ["reprove","express severe disapproval"], ["censure","express severe disapproval"], ["rebuke","express severe disapproval"], ["lithe","flexible; supple"], ["depreciate","lessen in value"], ["immaculate","pure; spotless"], ["brusque","blunt; abrupt"], ["valetudinarian","invalid"], ["foster","rear; encourage"], ["paucity","scarcity"], ["frolicsome","prankish; gay"], ["turpitude","depravity; meanness"], ["shackle","fester; chain"], ["astute","shrewd; wise"], ["disheveled","untidy"], ["ominous","threatening"], ["abash","embarrass"], ["irrevocable","unalterable"], ["swindler","cheater"], ["convoke","call together"], ["abeyance","suspended action"], ["indefatigable","tireless"], ["histrionic","theatrical"], ["accede","agree"], ["virile","manly"], ["reek","emit odor"], ["badger","pester; annoy"], ["salubrious","healthful"], ["extol","praise; glorify"], ["incommodious","not spacious"], ["accord","agreement"], ["eminent","high; lofty"], ["fiat","command"] ]; length = wordArray.length; </script> </head> <body> <form name="problem" method="post"> <span id="word"></span> <select name="answer" id="choiceDrop"> </select> <input type="button" value="check" onclick="checkAnswer()"> </form> <script type="text/javascript"> getWord(); </script> </body> </html>