git ssb

0+

k4ml / belajar-js



Commit 10a7a977e04c3ef63a929100bbfc05b280cacd8c

initial quiz

Kamal Mustafa committed on 3/29/2015, 4:06:22 PM
Parent: 084c01b393044ead2958af330fb5de1515de5682

Files changed

javascripts/quiz.jsadded
quiz.htmlchanged
javascripts/quiz.jsView
@@ -1,0 +1,40 @@
1+var QuizQuestions = [
2+ {
3+ question: "Siapa Perdana Menteri Pertama Malaysia ?",
4+ choices: [
5+ 'Tun Abdul Razak',
6+ 'Tun Mahathir',
7+ 'Tunku Abdul Rahman',
8+ 'Tengku Razaleigh'
9+ ],
10+ answer: 2
11+ },
12+ {
13+ question: "Apakah Gelaran yang diberikan kepada Tun Dr. Mahathir Mohamad ?",
14+ choices: [
15+ 'Bapa Kemerdekaan',
16+ 'Bapa Pemodenan',
17+ 'Bapa Pembangunan',
18+ 'Bapa Perpaduan'
19+ ],
20+ answer: 1
21+ },
22+ {
23+ question: "Pada tahun berapakah Persekutuan Malaysia dibentuk ?",
24+ choices: [
25+ '1963',
26+ '1957',
27+ '1980',
28+ '1981'
29+ ],
30+ answer: 0
31+ }
32+];
33+
34++function() {
35+ var contentArea, currentQuestion = 0, question;
36+
37+ contentArea = document.getElementById('viewport-home');
38+ question = QuizQuestions[currentQuestion];
39+ //contentArea.appendChild(docu
40+}();
quiz.htmlView
@@ -23,6 +23,7 @@
2323 <div id="viewport-message" class="viewport">
2424 <h2>Message</h2>
2525 </div>
2626 <script src="javascripts/nav.js" type="text/javascript"></script>
27+<script src="javascripts/quiz.js" type="text/javascript"></script>
2728 </body>
2829 </html>

Built with git-ssb-web