linkedin facebook linkedin facebook nod32

Javascript va jqureda onlayn test dasturini ishlash jarayoni

Muallif: Mengliyev Sh.

Qo`shilgan sana: 2017-02-24

Javascript va jqureda onlayn test dasturini ishlash jarayoni

Onlayn test dasturini ishlash jarayoni bilan tanishib chiqamiz. Quyida rasmda onlayn test dasturi ko`rsatilgan.

Bu onlayn test dasturi yaratish strukturasini quyida index.html fayl bilan boshlayman.
Index.html- dastur kodi

<!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" xml:lang="ru">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/>
<title>Test</title>
<script type="text/javascript" src="jquery.min.js"></script>
<script type="text/javascript" src="js/jQuizler.js"></script>
<link rel="stylesheet" href="css/bootstrap/css/bootstrap.min.css" />
<link rel="stylesheet" href="css/jQuizler.css" />
<script type="text/javascript">
var questions = [
{
type: "choose",
question: "<h3>Savol 1</h3>",
answers: [
"Javob 1",
"Javob 2",
"Javob 3"
],
correct: [1]
},
{
type: "choose",
question: "<h3>Savol 2</h3>",
answers: [
"Javob 1",
"Javob 2",
"Javob 3"
],
correct: [2]
},
{
type: "choose",
question: "<h3>Savol 3</h3>",
answers: [
"Javob 1",
"javob 2",
"Javob 3"
],
correct: [3]
},
{
type: "choose",
question: "<h3>Savol 4</h3>",
answers: [
"Javob 1",
"javob 2",
"Javob 3"
],
correct: [2]
},
{
type: "choose",
question: "<h3>Savol 5</h3>",
answers: [
"Javob 1",
"javob 2",
"Javob 3"
],
correct: [3]
}
];

$("document").ready(function(){
$("#jQuizler").jQuizler(questions);
});
</script>
</head>
<body>
<div id="jQuizler" class="main-quiz-holder">
<h3>Test</h3>
<button class="btn btn-large">Boshlash</button>
</div>
</body>
</html>

Bu erdan test savoli quyidagi JavaScript kodi orqali amalga oshiriladi.

type: "choose",
question: "<h3>Savol 1</h3>",
answers: [
"Javob 1",
"Javob 2",
"Javob 3"
],
correct: [1]
},

Savolni question: "<h3>Savol 1</h3>", kiritish orqali amalga oshiriladi.
Savollar javobini esa bir necha variantda berish mumkin masalan:

answers: [
"Javob 1",
"Javob 2",
"Javob 3",
"Javob 4",
"Javob 5"
],

Bu erda 5-ta javoblar variantini keltirdik. correct: [1] da berildi bu esa Javob 1 ekanligini bildiradi buni ixtiyariy correct: [4] yoki correct: [3] ixtiyoriy kiritishingiz mumkin. Shunda avtomatik belgilangan javobga bal beriladi.

Siz o`z bilimingizni shu test orqali sinab ko`ring va sichqoncha bilan test sinoviga bosing.

Php dan test orqali o`zingizni sinab ko`ring

yuklab olish 120 kbayt

1369 marta o`qildi.

Parol:
Eslab qolish.


Ro`yhatdan o`tish

testing

+998915878681

Siz o`z maxsulotingizni 3D reklama ko`rinishda bo`lishini xohlaysizmi? Unda xamkorlik qilamiz.

3D Reklama


Рейтинг@Mail.ru
Рейтинг@Mail.ru

Besucherzahler
счетчик посещений