Make your own free website on Tripod.com
"); parent.ReadingFrame.document.writeln ("
"); parent.ReadingFrame.document.writeln ("
") parent.ReadingFrame.document.writeln (""); parent.ReadingFrame.document.writeln (Stuff); parent.ReadingFrame.document.writeln ("
"); parent.ReadingFrame.document.close(); } function WriteToTimer(Stuff){ parent.TimerFrame.document.clear(); parent.TimerFrame.document.open(); parent.TimerFrame.document.writeln (""); parent.TimerFrame.document.writeln (""); parent.TimerFrame.document.writeln ("
"); parent.TimerFrame.document.writeln ("
") parent.TimerFrame.document.writeln (""); parent.TimerFrame.document.writeln (Stuff); parent.TimerFrame.document.writeln ("
"); parent.TimerFrame.document.close(); } var CurrentQ = 0; var RealGuess = ''; State = new Array(); Answers = new Array(); Answers[0] = new Array(); Answers[0][0] = 'Silalah makan'; Answers[1] = new Array(); Answers[1][0] = 'Tolong buka pintu pagar.'; Answers[2] = new Array(); Answers[2][0] = 'Belajarlah dengan bersungguh-sungguh, Talib.'; Answers[3] = new Array(); Answers[3][0] = 'Murid-murid, bersihkan cermin tingkap kelas.'; Answers[4] = new Array(); Answers[4][0] = 'Jangan bermain di jalan raya.'; var LowerString='abcdefghijklmnopqrstuvwxyz%9A%9C%E0%E1%E2%E3%E4%E5%E6%E7%E8%E9%EA%EB%EC%ED%EE%EF%F0%F1%F2%F3%F4%F5%F6%F8%F9%FA%FB%FC%FD%FE%FF'; var UpperString='ABCDEFGHIJKLMNOPQRSTUVWXYZ%8A%8C%C0%C1%C2%C3%C4%C5%C6%C7%C8%C9%CA%CB%CC%CD%CE%CF%D0%D1%D2%D3%D4%D5%D6%D8%D9%DA%DB%DC%DD%DE%9F'; LowerString = unescape(LowerString); UpperString = unescape(UpperString); var isIE = false; function StartUp(){ var i = 0; platform = 'win'; if ((navigator.appVersion.indexOf('Mac') != -1)&&(navigator.appName.indexOf('Microsoft') < 0)) { platform = 'mac'; } State.length = 0; for (i=0; i -1){ j = FromString.indexOf(InString.charAt(i)); OutString += ToString.charAt(j); } else{ OutString += InString.charAt(i); } } return OutString; } function TrimString(InString){ var x = 0 if (InString.length != 0) { while ((escape(InString.charAt(InString.length - 1)) == '%20') || (escape(InString.charAt(InString.length - 1)) == '%0A') || (escape(InString.charAt(InString.length - 1)) == '%0D')){ InString = InString.substring(0, InString.length - 1) } while ((escape(InString.charAt(0)) == '%20') || (escape(InString.charAt(0)) == '%0A') || (escape(InString.charAt(0)) == '%0D')){ InString = InString.substring(1, InString.length) } while (InString.indexOf(' ') != -1) { x = InString.indexOf(' ') InString = InString.substring(0, x) + InString.substring(x+1, InString.length ) } return InString } else { return '' } } function RemovePunctuation(InString){ var OutString = ''; for (i=0; i InArray[Longest].length){ Longest = i; } } return Longest; } function CheckWords(Guess, Answer){ var Start = 0; var End = 0; var LoopCounter = 0; var ReturnList = ''; var i = 0; var j = 0; GuessWords = new Array(); AnswerWords = new Array(); Guess = RemovePunctuation(Guess); Answer = RemovePunctuation(Answer); while (Guess.indexOf(' ', Start) > -1) { End = Guess.indexOf(' ', Start); GuessWords[LoopCounter] = ConvertCase(Guess.substring(Start, End), 0); LoopCounter++; Start = End + 1; } GuessWords[LoopCounter] = ConvertCase(Guess.substring(Start, Guess.length), 0); Start = 0; LoopCounter = 0; while (Answer.indexOf(' ', Start) > -1) { End = Answer.indexOf(' ', Start); AnswerWords[LoopCounter] = Answer.substring(Start, End); LoopCounter++; Start = End + 1; } AnswerWords[LoopCounter] = Answer.substring(Start, Answer.length); ReturnList = ''; for (i = 0; i < GuessWords.length; i++){ for (j = 0; j < AnswerWords.length; j++){ if (GuessWords[i] == ConvertCase(AnswerWords[j], 0)){ ReturnList = ReturnList + AnswerWords[j] + ', ' ; AnswerWords[j] = ''; break; } } } if (ReturnList.length > 0){ ReturnList = ReturnList.substring(0, ReturnList.length - 2); } return ReturnList; } function CheckAnswer(ShowHint, QNum){ //if the question's already correct, exit gracefully if (State[QNum-1][0] == 1){ ShowAnswers(QNum); return; } var Output = ''; //Get the guess, trim it, and translate it if necessary var Guess = TrimString(eval('document.QForm.Guess' + QNum).value); if (platform == 'mac'){ Guess = unescape(MacStringToWin(Guess)); } var RealGuess = Guess; if (CaseSensitive == false){ Guess = ConvertCase(Guess, 1); } if (Guess.length < 1){ WriteFeedback(EnterGuess); return; } //Get the correct answers and put them into an array CorrectAs = new Array(); RealAs = new Array(); for (var i=0; i';}; } if (Right > -1){ State[QNum-1][0] = 1; Output = CorrectResponse + ' '; if (OtherAnswers.length > 0){ Output += TheseAnswersToo + '
' + OtherAnswers; } //Check whether the quiz is finished var Finished = true; for (var i=0; i' + YourScoreIs + ' ' + Score + '. '; } if (Finished == true){ var CFT = 0; for (i=0; i 0){ CorrectBits[0][i] = RealAs[i].substring(0,CorrectBits[0][i].length); } CorrectBits[1][i] = CheckEnd(Guess, CorrectAs[i]); if (CorrectBits[1][i].length > 0){ CorrectBits[1][i] = RealAs[i].substring(RealAs[i].length-CorrectBits[1][i].length,RealAs[i].length); } CorrectBits[2][i] = CorrectBits[0][i] + ' ... ' + CorrectBits[1][i]; CorrectBits[3][i] = CorrectBits[0][i] + RealAs[i].charAt(CorrectBits[0][i].length); if (CorrectBits[3][i].charAt(CorrectBits[3][i].length-1) == ' '){ CorrectBits[3][i] += RealAs[i].charAt(CorrectBits[3][i].length); } CorrectBits[3][i] += '...' } var LongestCorrect = FindLongest(CorrectBits[2]); if (CorrectBits[2][LongestCorrect].length > 5){ Output = ThisMuchIsCorrect + '
' + CorrectBits[2][LongestCorrect]; } else{ if (ShowHint == false){ Output = IncorrectResponse; } } //Include words found in the answer var FoundWords = CheckWords(Guess, CorrectAs[LongestCorrect]) if (FoundWords.length > 0){ Output += '

' + TheseWordsAppear + FoundWords; } if (ShowHint == true){ Output += '

' + GiveHint + CorrectBits[3][LongestCorrect]; } } WriteFeedback(Output); } function WriteFeedback(Feedback) { Feedback = Webble(Feedback); parent.FeedbackFrame.document.clear(); parent.FeedbackFrame.document.open(); parent.FeedbackFrame.document.writeln (""); parent.FeedbackFrame.document.writeln (""); parent.FeedbackFrame.document.writeln ("
"); parent.FeedbackFrame.document.writeln ("
") parent.FeedbackFrame.document.writeln ("
"); parent.FeedbackFrame.document.writeln (Feedback); parent.FeedbackFrame.document.writeln ("
"); parent.FeedbackFrame.document.close(); } CharList = new Array(); EscapeList = new Array(); function Webble(InString){ var OutString = ''; var NextChar = ''; var FoundCode = ''; var j = 0; var i = 0; for (i=0; i 0){ OutString += FoundCode; } else{ OutString += NextChar; } } return OutString; } var MacChars = '%80%81%82%83%84%85%86%87%88%89%8A%8B%8C%8D%8E%8F%90%91%92%93%94%95%96%97%98%99%9A'; MacChars += '%9B%9C%9D%9E%9F%A0%A1%A4%A5%A6%A7%A8%AA%AB%AC%AE%AF%B4%B6%BB%BC%BE%BF%C0%C1%C2%C4%C7%C8'; MacChars += '%C9%CA%CB%CC%CD%CE%CF%D0%D1%D2%D3%D4%D5%D6%D8%D9%DA%DB%DC%DD%E0%E1%E2%E3%E4%E5%E6%E7%E8%E9'; MacChars += '%EA%EB%EC%ED%EE%EF%F1%F2%F3%F4%F5%F6%F7%F8%FB%FD'; var WinChars = '%C4%C5%C7%C9%D1%D6%DC%E1%E0%E2%E4%E3%E5%E7%E9%E8%EA%EB%ED%EC%EE%EF%F1%F3%F2%F4'; WinChars += '%F6%F5%FA%F9%FB%FC%86%BA%A7%95%B6%DF%AE%99%92%A8%C6%D8%A5%F0%AA%BA%E6%F8%BF%A1%AC%83%AB%BB'; WinChars += '%85%82%C0%C3%D5%8C%9C%96%97%93%94%91%92%F7%FFY/%A4%8B%9B%87%B7%82%84%89%C2%CA%C1%CB'; WinChars += '%C8%CD%CE%CF%CC%D3%D4%D2%DA%DB%D9%B9%88%98%AF%B0%94'; WinChars = unescape(WinChars); MacChars = unescape(MacChars) function MacStringToWin(InString){ var OutString = ''; for (i=0; i '~') && (MacChars.indexOf(InString.charAt(i)) > -1) ){ OutString += WinChars.charAt(MacChars.indexOf(InString.charAt(i))); } else { OutString += InString.charAt(i); } } return escape(OutString); } function WinStringToMac(InString){ var OutString = ''; for (i=0; i '~') && (WinChars.indexOf(InString.charAt(i)) > -1) ){ OutString += MacChars.charAt(WinChars.indexOf(InString.charAt(i))); } else { OutString += InString.charAt(i); } } return escape(OutString); } function ShowAnswers(QNum){ //If the question isn't done, mark it as done. Score will be 0; State[QNum-1][0] = 1; State[QNum-1][1] = -1; State[QNum-1][2] = -1; //Get the correct answers and put them into an array var Output = TheseCorrect + '
';; for (var i=0; i'; } WriteFeedback(Output); return true; }

Bina ayat perintah berdasarkan keterangan yang diberi
Kuiz jawapan pendek
 

1Ramli mempersilakan tetamunya menikmati juadah yang disediakan.

2Encik Wong menyuruh anaknya membuka pintu pagar.

3Haji Samad menasihati Talib supaya belajar bersungguh-sungguh.

4Cikgu Salmi menyuruh murid-muridnya membersihkan cermin tingkap kelas.

5Ayah menasihati adik agar tidak bermain di jalan raya.