-
Notifications
You must be signed in to change notification settings - Fork 11
/
quiz.html
120 lines (91 loc) · 2.89 KB
/
quiz.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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
<!DOCTYPE html>
<html>
<head>
<title>Sriram's quiz</title>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<!-- jQuery library -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<script type="text/javascript">
function myFunction() {
var totalQuestionsAnswered=0;
alert("Thank you for participating in the Quiz, you have attempted 6 out of 10 questions")
let value= document.getElementById("o2").checked;
console.log(value)
}
</script>
<body>
<div class="container">
<div class="row">
<form action="">
<div class="form-group">
<label> Question1 :- Do you like CIST1300</label>
</div>
<div class="form-group">
<label><input type="radio" value="o1" name="op1" id="o1" checked="checked">Option1</label>
</div>
<div class="form-group">
<label><input type="radio" name="op1" id="o2" value="02">Option2</label>
</div>
<div class="form-group">
<label><input type="radio" name="op1" value="03">Option3</label>
</div>
<div class="form-group">
<label><input type="radio" name="op1" value="04">Option4</label>
</div>
<button type="button" class="btn btn-success" onclick="myFunction()">Test</button>
</form>
<div class="panel-group">
<div class="panel panel-danger">
<div class="panel-heading">
<a data-toggle="collapse" href="#collapse1">Question 1</a>
</h4>
</div>
<div id="collapse1" class="panel-collapse collapse">
<div class="panel-body">
<div class="form-group">
<label> Question1 :- Do you like CIST1300</label>
</div>
<div class="form-group">
<label><input type="checkbox" value="">Option1</label>
</div>
<div class="form-group">
<label><input type="checkbox" value="">Option2</label>
</div>
<div class="form-group">
<label><input type="checkbox" value="">Option3</label>
</div>
<div class="form-group">
<label><input type="checkbox" value="">Option4</label>
</div>
</div>
</div>
</div>
</div>
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#myModal">Modal Window</button>
<div class="modal" id="myModal">
<div class="modal-dialog">
<div class="modal-content">
<!-- Modal Header -->
<div class="modal-header">
<h4 class="modal-title">Modal Heading</h4>
<button type="button" class="close" data-dismiss="modal">×</button>
</div>
<!-- Modal body -->
<div class="modal-body">
Modal body..
</div>
<!-- Modal footer -->
<div class="modal-footer">
<button type="button" class="btn btn-danger" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>