0
Can we make an exam questions with html + javascript? What's the script?
8 Answers
+ 1
<html>
<head>
<title>
Exam
</title>
</head>
<body>
<p id="question_text">
Why is this question so easy
</p>
<br />
<p id="answer"></p>
<button class="btn" onClick="loadIn()" style="height:50vw;width:50vw;border-radius:50%;">Click Me
</button>
<script>
function loadIn(){
target = document.getElementById ('answer');
target.innerHTML = "because ur teacher's too lazy";
};
</script>
</body>
</html>
+ 1
1)ask them what would happen if they click the button
+ 1
1)
ANS
nothing, because there should be a var infront of the target=document...... in order for the code to work
+ 1
2) ask them why is it bad to use css in html
+ 1
+ 1
3)
ask them to write a style sheet for the button, and you may also include some style attributes to elements with class attributes
+ 1
3)
ANS
plz do it yourself
0
alright thanks