Tuesday, September 17, 2024
DSSSB Previous Year Questions PGT Commerce 2014 (Finance)
Quiz on Finance
body {
font-family: Arial, sans-serif;
background-color: #f4f4f4;
padding: 20px;
}
.question {
margin: 20px 0;
}
.options {
margin: 10px 0;
}
.option {
margin: 5px 0;
cursor: pointer;
padding: 10px;
background: #fff;
border: 1px solid #ccc;
border-radius: 5px;
}
.correct {
background-color: #d4edda;
}
.wrong {
background-color: #f8d7da;
}
.answer {
margin-top: 10px;
font-weight: bold;
}
function checkAnswer(questionId, userAnswer, correctAnswer) {
const answerDiv = document.getElementById(questionId);
if (userAnswer) {
answerDiv.innerHTML = "Correct Answer!";
answerDiv.classList.add('correct');
answerDiv.classList.remove('wrong');
} else {
answerDiv.innerHTML = "Wrong Answer! Correct answer is " + correctAnswer + ".";
answerDiv.classList.add('wrong');
answerDiv.classList.remove('correct');
}
}
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment
Leave Your Comment