I am a student and creating a mock questionnaire…whats rong with this? because it doesnt run in my browser?
<!DOCTYPE html>
<html>
<head><title>GradingSheet</title>
</head>
<style>
</style>
<body>
<p>1. What is my name?</p>
<input id=”jong” style type=”radio” value=”a”>a. John</input>
<input id=”jong2″ style type=”radio”>b. Johnx</input>
<input id=”jong3″ style type=”radio”>c. Johnyx</input>
<p>2. What is my last name?</p>
<input id=”jong” style type=”radio”>a. Lenon</input>
<input id=”jong2″ style type=”radio”>b. Lenox</input>
<input id=”jong3″ style type=”radio” value=”v”>c. Lennon</input><br><br>
<button onclick=”myFunction()” type=”submit” value=”Submit”>Submit</button><br><br>
<input id=”result” style=”text” name=”Score”></input>
<script>
function myFunction() {
var a = document.getElementById(“jong”);
var b = document.getElementById(“jong3”);
var score = 0
var c;
for (c=0; c<a.length; c++){
if(a[c].checked) {
if (a[c].value == “a”){score++}
}
}
for (c=0; c<b.length; c++){
if(b[c].checked) {
if (b[c].value == “b”){score++}
}
}
if (score == 2) {message= score
}
document.getElementById(“result”).value = message;
}
</script>
</body>
</html>