please
This commit is contained in:
12
index.html
12
index.html
@@ -43,16 +43,12 @@
|
|||||||
<div id="choices" class="card-body">
|
<div id="choices" class="card-body">
|
||||||
<form action="javascript:;">
|
<form action="javascript:;">
|
||||||
<div>
|
<div>
|
||||||
<label class="form-label" id="label1" for="ans1"> Student Name </label>
|
<button id="ans1" class="btn btn-primary" type="button" > </button>
|
||||||
<input class="form-check-label" type="button" id="ans1">
|
<button id="ans2" class="btn btn-primary" type="button" ></button>
|
||||||
<label class="form-label" id="label2" for="ans2"> Student Name </label>
|
|
||||||
<input class="form-check-label" type="button" id="ans2">
|
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label class="form-label" id="label3" for="ans3"> Student Name </label>
|
<button id="ans3" class="btn btn-primary" type="button"></button>
|
||||||
<input class="form-check-label" type="button" id="ans3">
|
<button id="ans4" class="btn btn-primary" type="button"></button>
|
||||||
<label class="form-label" id="label4" for="ans4"> Student Name </label>
|
|
||||||
<input class="form-check-label" type="button" id="ans4">
|
|
||||||
</div>
|
</div>
|
||||||
<button onclick="questionSubmit()" type="submit" class="btn btn-primary">Submit</button>
|
<button onclick="questionSubmit()" type="submit" class="btn btn-primary">Submit</button>
|
||||||
</form>
|
</form>
|
||||||
|
|||||||
2
index.js
2
index.js
@@ -103,7 +103,7 @@ console.log(questions[0].answers);
|
|||||||
function setQ(n) {
|
function setQ(n) {
|
||||||
var question = document.getElementById("question")
|
var question = document.getElementById("question")
|
||||||
question.innerText = questions[n].title;
|
question.innerText = questions[n].title;
|
||||||
var labels = ["label1", "label2", "label3", "label4",]
|
var labels = ["ans1", "ans2", "ans3", "ans4",]
|
||||||
var current_question = JSON.parse(JSON.stringify(questions[n].answers));
|
var current_question = JSON.parse(JSON.stringify(questions[n].answers));
|
||||||
for (let i = 0; i < current_question.length; i++) {
|
for (let i = 0; i < current_question.length; i++) {
|
||||||
var q = document.getElementById(labels[i]);
|
var q = document.getElementById(labels[i]);
|
||||||
|
|||||||
Reference in New Issue
Block a user