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