-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
68 lines (60 loc) · 2.44 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<!DOCTYPE html>
<html>
<head>
<title>JavaScript Quiz</title>
<link rel="stylesheet" type="text/css" href="styles.css">
</head>
<body>
<div class="container">
<!--Heading/title-->
<header>
<h1>Simple JavaScript Quiz</h1>
</header>
<!--create form that contains the questions-->
<section>
<div id="results"></div>
<form name="quizForm" onsubmit="return submitAnswers()">
<label>1. In which HTML element do we put in Javascript code?</label>
<br>
<input type="radio" name="q1" value="a">a. <js><br>
<input type="radio" name="q1" value="b">b. <script><br>
<input type="radio" name="q1" value="c">c. <body><br>
<input type="radio" name="q1" value="d">d. <head><br>
<!--2. Which html attribute is used to reference an external JavaScript file?
answer: a. src-->
<label>2. Which html attribute is used to reference an external JavaScript file?</label>
<br>
<input type="radio" name="q2" value="a">a. src<br>
<input type="radio" name="q2" value="b">b. link<br>
<input type="radio" name="q2" value="c">c. href<br>
<input type="radio" name="q2" value="d">d. type<br>
<!--3. How do we call an alert box?
answer d. alert("Hello")-->
<label>3. How do we call an alert box?</label>
<br>
<input type="radio" name="q3" value="a">a. msg("Hello");<br>
<input type="radio" name="q3" value="b">b. alertBox("Hello");<br>
<input type="radio" name="q3" value="c">c. document.write("Hello");<br>
<input type="radio" name="q3" value="d">d. alert("Hello");<br>
<!--4. JavaScript is the same as Java?
answer a. False-->
<label>4. JavaScript is the same as Java?</label>
<br>
<input type="radio" name="q4" value="a">a. False<br>
<input type="radio" name="q4" value="b">b. True<br>
<!--5. How do you comment a line out in JavaScript?
answer c. //-->
<label>5. How do you comment a line out in JavaScript?</label>
<br>
<input type="radio" name="q5" value="a">a. dis one<br>
<input type="radio" name="q5" value="b">b. */<br>
<input type="radio" name="q5" value="c">c. //<br>
<input type="radio" name="q5" value="d">d. none of the above<br>
<input type="submit" name="Submit Answers">
</form>
</section>
<!--create Submit button-->
</div>
<script type="text/javascript" src="scripts.js"></script>
</body>
</html>