This would be my second question, and I want to ask you guys what the problem is this:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>HyunseoQuiz</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" media="screen" href="main.css">
<script lang="text/javascript">
function firstQ(){
var firstQuestion = document.getElementById('firstQuestion').value;
if(firstQuestion == '5'){
document.getElementById("firQ").innerHTML = "Correct";
} else {
document.getElementById("firQ").innerHTML = "Wrong!";
}
}
</script>
</head>
<body>
<form name="firstQ" action="">
<p>Q1. What is 2 + 3?</p>
<input type="text" id="firstQuestion" name="firstQ">
<input type="button" id="firstQ" value="answer" onclick="firstQ()">
<br>
<p id="firQ"></p>
</form>
</body>
</html>
I want if the number 5 is in the variable, I want to show the word 'Correct' below the input box.
Can anybody help me pleaaaaaaaaaaaaaaaaaaaaaaaaaaaaaase?
[sorry if my grammar is wrong. I am not good in English]