¾Æ·¡´Â º»¿¹Á¦ÀÇ ÀÚ¹Ù½ºÅ©¸³Æ® ÀÔ´Ï´Ù.
<html> <head> <title>ÇØÇÇCGI</title>
<script language="javascript"> var delay=10; //½Ã°£¼³Á¤ var correctAnswers=new Array("c","b","d","c","d"); //Á¤´ä
var q_num=1; var timer; var layer; var clock=delay; var score=0;
function show_question(){ if (layer=eval("document.all.question"+q_num)){ layer.style.display="inline"; document.all.timeLeft.innerHTML=clock; hide_question(); } else { document.all.timeLeft.innerHTML=0; document.all.quizScore.innerHTML="´ç½ÅÀº "+(q_num-1)+"¹®Á¦Áß "+score+"°³¸¦ ¸ÂÃè½À´Ï´Ù."; document.all.quizScore.style.display="inline"; } }
function hide_question(){ if (clock>0) { document.all.timeLeft.innerHTML=clock; clock--; timer=setTimeout("hide_question()",1000); } else { clearTimeout(timer); document.all.answerBoard.innerHTML=" "; clock=delay; layer.style.display="none"; q_num++; show_question(); } }
function check_answer(answer){ if (correctAnswers[q_num-1]==answer){ score++; document.all.answerBoard.innerHTML="<font color=blue><b>Á¤´äÀÔ´Ï´Ù.</b></font>"; } else { document.all.answerBoard.innerHTML="<font color=red><b>¶¯! Ʋ·È½À´Ï´Ù.</b></font>"; } clock=0; clearTimeout(timer); timer=setTimeout("hide_question()",700); }
window.onload=show_question; </script> </head>
<body>
Á¦Çѽð£ : <B><span id="timeLeft"></span></B> ÃÊ<br> <br> <div id="answerBoard"> </div> <br>
<div id="question1" style="display:none"> <b>1. ÇØÇÇCGI°¡ ÆǸÅÇÏ´Â ¼Ö·ç¼ÇÀÌ ¾Æ´Ñ°ÍÀº?</b><br> <a href="javascript:void(0)" onclick="check_answer('a')">a) ÇØÇǺε¿»ê</a><br> <a href="javascript:void(0)" onclick="check_answer('b')">b) ÇØÇÇ´º½º</a><br> <a href="javascript:void(0)" onclick="check_answer('c')">c) ÇØÇǹö½ºµ¥ÀÌ</a><br> <a href="javascript:void(0)" onclick="check_answer('d')">d) ÇØÇÇÀÚµ¿Â÷</a><br> </div>
<div id="question2" style="display:none"> <b>2. RGB»öÀÇ ±âº»ÀÌ ¾Æ´Ñ°ÍÀº?</b><br> <a href="javascript:void(0)" onclick="check_answer('a')">a) »¡°</a><br> <a href="javascript:void(0)" onclick="check_answer('b')">b) ÁÖȲ</a><br> <a href="javascript:void(0)" onclick="check_answer('c')">c) ÃÊ·Ï</a><br> <a href="javascript:void(0)" onclick="check_answer('d')">d) ÆĶû</a><br> </div>
<div id="question3" style="display:none"> <b>3. Å¿ջç½Å±â¿¡¼ ¹°À» °üÀåÇÏ¸ç µ¿ÂÊÀÇ ¼öÈ£¸¦ ´ã´çÇÏ´Â ½ÅÀÇ À̸§Àº?</b><br> <a href="javascript:void(0)" onclick="check_answer('a')">a) ÇöÁØ</a><br> <a href="javascript:void(0)" onclick="check_answer('b')">b) Çö¹Ì</a><br> <a href="javascript:void(0)" onclick="check_answer('c')">c) Çöö</a><br> <a href="javascript:void(0)" onclick="check_answer('d')">d) Çö¹«</a><br> </div>
<div id="question4" style="display:none"> <b>4. À¯Àç¼®ÀÌ ´ã´çÇÏ´Â ÇÁ·Î±×·¥Áß ¾Æ´Ñ°ÍÀº?</b><br> <a href="javascript:void(0)" onclick="check_answer('a')">a) ¹«ÇѵµÀü</a><br> <a href="javascript:void(0)" onclick="check_answer('b')">b) ÇØÇÇÅõ°Ô´õ</a><br> <a href="javascript:void(0)" onclick="check_answer('c')">c) ÁöÇÇÁö±â</a><br> <a href="javascript:void(0)" onclick="check_answer('d')">d) Áø½Ç°³ÀÓ</a><br> </div>
<div id="question5" style="display:none"> <b>5. ¹ÝÁöÀÇ Á¦¿Õ¿¡¼ ÇÁ·ÎµµÀÇ ¹ßÄ¡¼ö´Â?</b><br> <a href="javascript:void(0)" onclick="check_answer('a')">a) 290mm</a><br> <a href="javascript:void(0)" onclick="check_answer('b')">b) 300mm</a><br> <a href="javascript:void(0)" onclick="check_answer('c')">c) 310mm</a><br> <a href="javascript:void(0)" onclick="check_answer('d')">d) ±Û¾´À̵µ ¸ð¸¥´Ù.</a><br> </div>
<div id="quizScore" style="display:none"> </div>
</body> </html>
|