¾Æ·¡´Â º» ¿¹Á¦ÀÇ ÀÚ¹Ù½ºÅ©¸³Æ®ÀÔ´Ï´Ù.
<html> <head> <title>ÇØÇÇCGI</title> </head>
<body>
<SCRIPT LANGUAGE="JavaScript"> <!-- var guessme=Math.round(Math.random()*(99)+1); var speech='1~100 »çÀÌ ¼ýÀÚ¸¦ ÀÔ·ÂÇϼ¼¿ä.';
function process(mystery) { var guess=document.forms.guessquiz.guess.value; var speech='"'+guess+ '" Á¤È®ÇÑ ¼ýÀÚ¸¦ ÀÔ·ÂÇϼ¼¿ä.'; document.forms.guessquiz.guess.value='';
if (guess==mystery){ document.forms.guessquiz.prompt.value='ÃàÇÏÇÕ´Ï´Ù.! '+mystery+' ÀÌ Á¤´äÀÔ´Ï´Ù.!'; alert ('ÄÄÇ»ÅÍ°¡ ¼±ÅÃÇÑ ¹øÈ£´Â '+mystery+' ÀÔ´Ï´Ù.! È®ÀÎÀ» ´©¸£¸é °ÔÀÓÀ» ´Ù½Ã ½ÃÀÛÇÕ´Ï´Ù.'); speech=''; document.location=document.location; }
if (mystery<guess){ speech=guess + 'º¸´Ù´Â ÀÛ½À´Ï´Ù.'; }
if (mystery>guess){ speech=guess + 'º¸´Ù´Â Å®´Ï´Ù.'; }
if (guess==''){ speech='You didn\'t guess anything!' } document.forms.guessquiz.prompt.value=speech; document.forms.guessquiz.guess.focus(); }
//--> </SCRIPT>
<FORM onSubmit="" NAME="guessquiz"> <TABLE> <TR> <TD> <INPUT TYPE="text" NAME="prompt" SIZE="31" MAXLENGTH="40" VALUE="1~100 »çÀÌ ¼ýÀÚ¸¦ ÀÔ·ÂÇϼ¼¿ä."><BR> <INPUT TYPE="text" NAME="guess" SIZE="3" MAXLENGTH="3" VALUE=""> <INPUT TYPE="button" VALUE="Guess" onClick='process(guessme)'> </TD> </TR> </TABLE> </FORM>
</body> </html>
|