Дальше уже сами пишите. Лайк если помог.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!--!!!!!!!!!!!!!!!!!!!!!НАПИСАТЬ ОБЯЗАТЕЛЬНО!!!!!!!!!!!!!!!!!!!!!!-->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" type="text/javascript"></script>
<!--!!!!!!!!!!!!!!!!!!!!!НАПИСАТЬ ОБЯЗАТЕЛЬНО!!!!!!!!!!!!!!!!!!!!!!-->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<style type = "text/css">
div.questionBlock {
display: block; /*ЗАЧЕМ none???*/
}
</style>
<script type="text/javascript">
$(function(){
$('.questionForm input[type=submit]').on('click', function(e){
var answer=0;
for(i=0;i<$('.group').length;i++){
$('.group').eq(i).each(function(id, elem){
if($(elem).find('input:checked').length!=0){
if($(elem).find('input:checked').attr('value')==1){
answer++;
}
}
})
}
alert("Тест пройден на: "+(answer/$('.group').length)*100+'%')
return false
})
})
</script>
<title> Сборка ПК - Контактная информация </title>
<link href="style.css" rel="stylesheet" type="text/css" />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
</head>
<body>
<div id="wrap">
<div id="masthead">
<h1>Все о сборке ПК</h1>
<div id="menucontainer">
<div id="menunav">
<ul>
<li><a href="F:\Web-Сайт\www.sborka-pk.ru\Главная.html"><span>Главная</span></a></li>
<li><a href="F:\Web-Сайт\www.sborka-pk.ru\Обучение.html"><span>Обучение</span></a></li>
<li><a href="F:\Web-Сайт\[url]www.sborka-pk.ru\Контактная[/url] информация.html" class="current"><span>Контактная информация </span></a></li>
</ul>
</div>
</div>
</div>
<br>
<font size="+2"><p align="center">
Тест по теме: Знакомство с ПК и его составными</font></p>
<div class = "questionBlock">
<font size="+1">
<br>
<!--!!!!!!!!!!!!!!!!!!!!!НАПИСАТЬ ОБЯЗАТЕЛЬНО!!!!!!!!!!!!!!!!!!!!!!-->
<form method="POST" action="test.php" class="questionForm">
<!--!!!!!!!!!!!!!!!!!!!!!НАПИСАТЬ ОБЯЗАТЕЛЬНО!!!!!!!!!!!!!!!!!!!!!!-->
<!--!!!!!!!!!!!!!!!!!!!!!Исправить атрибут 'name' ОБЯЗАТЕЛЬНО!!!!!!!!!!!!!!!!!!!!!!-->
<div class="group">
Вопрос 1:<br>
<input type = "radio" name="q1" value="0">1<br>
<input type = "radio" name="q1" value="1">2<br>
<input type = "radio" name="q1" value="0">3<br>
<input type = "radio" name="q1" value="0">4<br>
<input type = "radio" name="q1" value="0">5<br>
<input type = "radio" name="q1" value="0">6<br>
</div>
<br>
<div class="group">
Вопрос 2:<br>
<input type = "radio" name="q2" value="1">1)<br>
<input type = "radio" name="q2" value="0">2)<br>
<input type = "radio" name="q2" value="0">3)<br>
<input type = "radio" name="q2" value="0">4)<br>
<input type = "radio" name="q2" value="0">5)<br>
</div>
<br>
<div class="group">
Вопрос 3:<br>
<input type = "radio" name="q3" value="0">1)<br>
<input type = "radio" name="q3" value="0">2)<br>
<input type = "radio" name="q3" value="1">3)<br>
</div>
<br>
<div class="group">
Вопрос 4:<br>
<input type = "radio" name="q4" value="0">1)<br>
<input type = "radio" name="q4" value="0">2)<br>
<input type = "radio" name="q4" value="0">3)<br>
<input type = "radio" name="q4" value="1">4)<br>
</div>
<br>
<div class="group">
Вопрос 5:<br>
<input type = "radio" name="q5" value="1">1)<br>
<input type = "radio" name="q5" value="0">2)<br>
<input type = "radio" name="q5" value="0">3)<br>
<input type = "radio" name="q5" value="0">4)<br>
</div>
<br>
<div class="group">
Вопрос 6:<br>
<input type = "radio" name="q6" value="1">1)<br>
<input type = "radio" name="q6" value="0">2)<br>
<input type = "radio" name="q6" value="0">3)<br>
<input type = "radio" name="q6" value="0">4)<br>
</div>
<br>
<div class="group">
Вопрос 7:<br>
<input type = "radio" name="q7" value="0">1)<br>
<input type = "radio" name="q7" value="0">2)<br>
<input type = "radio" name="q7" value="1">3)<br>
<input type = "radio" name="q7" value="0">4)<br>
</div>
<br>
<div class="group">
Вопрос 8:<br>
<input type = "radio" name="q8" value="0">1)<br>
<input type = "radio" name="q8" value="1">2)<br>
<input type = "radio" name="q8" value="0">3)<br>
<input type = "radio" name="q8" value="0">4)<br>
</div>
<br>
<div class="group">
Вопрос 9:<br>
<input type = "radio" name="q9" value="0">1)<br>
<input type = "radio" name="q9" value="1">2)<br>
<input type = "radio" name="q9" value="0">3)<br>
<input type = "radio" name="q9" value="0">4)<br>
</div>
<br>
<br>
<div class="group">
Вопрос 10:<br>
<input type = "radio" name="q10" value="0">1)<br>
<input type = "radio" name="q10" value="0">2)<br>
<input type = "radio" name="q10" value="0">3)<br>
<input type = "radio" name="q10" value="1">4)<br>
</div>
<br>
<!--<input type="button" value="Ответить" onclick="qa.nextOrResult()"> НЕПРАВИЛЬНО!!!!!!!!!-->
<input type="submit" value="ОТПРАВИТЬ" name="submit" />
<!--!!!!!!!!!!!!!!!!!!!!!Исправить атрибут 'name' ОБЯЗАТЕЛЬНО!!!!!!!!!!!!!!!!!!!!!!-->
<!--!!!!!!!!!!!!!!!!!!!!!НАПИСАТЬ ОБЯЗАТЕЛЬНО!!!!!!!!!!!!!!!!!!!!!!-->
</form>
</font>
</div>
<!--!!!!!!!!!!!!!!!!!!!!!НАПИСАТЬ ОБЯЗАТЕЛЬНО!!!!!!!!!!!!!!!!!!!!!!-->
<script type = "text/javascript">
/*var qa = new QuestAnalizer();
function QuestAnalizer() {
var now = 0, printed = false, rightCount = 2;
var questionBlocks = document.querySelectorAll("div.questionBlock");
var allQCount = questionBlocks.length;
this.nowRight = 0;
questionBlocks[now].style.display = "block";
this.nextOrResult = function () {
if (now >= allQCount-1) {
now++;
if (!printed) {
questionBlocks[now - 1].style.display = "none"
var p = document.createElement("p");
p.innerHTML = "Верных ответов " + rightCount + ". Вы набрали " + (rightCount / allQCount * 100).toFixed(0) + "%";
document.body.appendChild(p);
printed = true;
} else {
alert("Ваш результат на экране.");
}
} else {
questionBlocks[now].style.display = "none";
now++;
rightCount += this.nowRight;
questionBlocks[now].style.display = "block";
}
}
}
*/
</script>
<div id="navcontainer">
</div>
<p></p>
</div>
<div id="content">
<h2>
</h2>
</div>
</div>
</div>
<div id="footer">
</body>
</html>