test online

Test your Response time!

Click on „Start” first, and wait until the background color changes. As soon as it changes, hit „stop!” <!– //Reflext Tester- By Andy Scott (based on script by Jasper van Zandbeek) //http://www.geocities.com/SiliconValley/Station/4320/ //Submitted to Dynamic Drive for inclusion //Visit http://www.dynamicdrive.com for this script var startTime=new Date(); var endTime=new Date(); var startPressed=false; var bgChangeStarted=false; var maxWait=20; var timerID; var colors=new Array("tomato","chocolate","limegreen","crimson","darkslategray", "aliceblue","mediumslateblue","cornflowerblue","darkorchid","darkkhaki","coral", "darkolivegreen","cadetblue") if (document.all||document.getElementById) document.write('

‘) function startTest() { if (document.all) document.all.reflex.style.backgroundColor=colors[Math.floor(Math.random()*colors.length)]; else if (document.getElementById) document.getElementById(„reflex”).style.backgroundColor=colors[Math.floor(Math.random()*colors.length)]; else if (document.layers) document.reflexns.document.reflexns_sub.document.bgColor=colors[Math.floor(Math.random()*colors.length)]; bgChangeStarted=true; startTime=new Date(); } function remark(responseTime) { var responseString=””; if (responseTime = 0.10 && responseTime =0.20 && responseTime =0.30 && responseTime =0.60 && responseTime =1) responseString=”Did you fall asleep?”; return responseString; } function stopTest() { if(bgChangeStarted) { endTime=new Date(); var responseTime=(endTime.getTime()-startTime.getTime())/1000; if (document.all) document.all.reflex.style.backgroundColor=”white”; else if (document.getElementById) document.getElementById(„reflex”).style.backgroundColor=”white”; else if (document.layers) document.reflexns.document.reflexns_sub.document.bgColor=”white”; alert(„Your response time is: ” + responseTime + ” seconds ” + „\n” + remark(responseTime)); startPressed=false; bgChangeStarted=false; } else { if (!startPressed) { alert(„press start first to start test”); } else { clearTimeout(timerID); startPressed=false; alert(„cheater! you pressed too early!”); } } } var randMULTIPLIER=0x015a4e35; var randINCREMENT=1; var today=new Date(); var randSeed=today.getSeconds(); function randNumber() { randSeed = (randMULTIPLIER * randSeed + randINCREMENT) % (1 <> 15) & 0x7fff) / 32767; } function startit() { if(startPressed) { alert(„Already started. Press stop to stop”); return; } else { startPressed=true; timerID=setTimeout(‘startTest()’, 6000*randNumber()); } } // –>

Free DHTML scripts provided by
Dynamic Drive

Lasă un răspuns

Completează mai jos detaliile despre tine sau dă clic pe un icon pentru autentificare:

Logo WordPress.com

Comentezi folosind contul tău WordPress.com. Dezautentificare / Schimbă )

Poză Twitter

Comentezi folosind contul tău Twitter. Dezautentificare / Schimbă )

Fotografie Facebook

Comentezi folosind contul tău Facebook. Dezautentificare / Schimbă )

Fotografie Google+

Comentezi folosind contul tău Google+. Dezautentificare / Schimbă )

Conectare la %s