Đầu tiên bạn phải có câu hỏi có 4 lựa chọn và đáp án rõ ràng.
Bước 1: HTML đáp án
- Code:
-
var correctchoices=new Array()
correctchoices[1]='d'
correctchoices[2]='a'
correctchoices[3]='d'
correctchoices[4]='b'
correctchoices[5]='a'
correctchoices[6]='b'
correctchoices[7]='b'
correctchoices[8]='d'
correctchoices[9]='c'
correctchoices[10]='d'
Bước 2: HTML kết quả - Code:
-
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Kết quả</title>
</head>
<body style="font-family: Tahoma">
<p align="center"><strong><script src="[color=#41cf3a]HTML đáp án[/color]">
</script>
<font size="4"> Kết quả</font></strong></p><div align="center"><center>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="100%"><form method="POST" name="result" action="--WEBBOT-SELF--">
<table border="0" width="100%" cellpadding="0">
<tr>
<td bgcolor="auto"><strong><font size="2">Số câu
hỏi trả lời đúng:</font></strong></td>
<td height="25"><div align="right"><p><input type="text" name="p" size="10"></td>
</tr>
<tr>
<td bgcolor="auto"><strong><font size="2">Những câu
trả lời sai:</font></strong></td>
<td height="17"><div align="right"><p><input type="text" name="T2" size="10"></td>
</tr>
<tr>
<td bgcolor="auto"><strong><font size="2">Bạn đă
đạt được:</font></strong></td>
<td height="25"><input type="text" name="q" size="10"></td>
</tr>
</table>
</form>
</td>
</tr>
</table>
</center></div>
<form method="POST" action="--WEBBOT-SELF--">
<div align="center"><center><p><script>
var wrong=0
var totalquestions=10
for (e=0;e<=2;e++)
document.result[e].value=""
var results=document�cookie.split(";")
for (n=0;n<=results.length-1;n++){
if (results[n].charAt(1)=='q')
parse=n
}
var incorrect=results[parse].split("=")
incorrect=incorrect[1].split("/")
if (incorrect[incorrect.length-1]=='b')
incorrect=""
document.result[0].value=totalquestions-incorrect.length+"/"+totalquestions
document.result[2].value=(totalquestions-incorrect.length)/totalquestions*100+"%"
for (temp=0;temp<incorrect.length;temp++)
document.result[1].value+=incorrect[temp]+", "
function showsolution(){
var win2=window.open("","win2","width=200,height=250")
win2.focus()
win2.document.open()
win2.document.write('<title>Đáp án</title>')
win2.document.write('<body bgcolor="#FFFFFF">')
win2.document.write('<center><h3>Đáp án</h3></center>')
win2.document.write('<center><font size="2" face="Tahoma">')
for (i=1;i<=totalquestions;i++){
for (temp=0;temp<incorrect.length;temp++){
if (i==incorrect[temp])
wrong=1
}
if (wrong==1){
win2.document.write("Câu hỏi "+i+"="+correctchoices[i].fontcolor("red")+"<br>")
wrong=0
}
else
win2.document.write("Câu hỏi "+i+"="+correctchoices[i]+"<br>")
}
win2.document.write('</center></font>')
win2.document.write('<font
size="1" face="Tahoma"><center>Lưu ý: Đáp án sai được đánh dấu
bằng màu đỏ</center></font>')
win2.document.close()
}
</script>
<input type="button" value="Quay lại" name="B1"
onClick="history.go(-1)"> <input type="button" value="Xem Đáp án" name="B2"
onClick="showsolution()"></p>
</center></div>
</form>
<p
align="center"><a href="http://cfviet.co.cc"><font
size="2">Clan battuvuong</font></a></p>
</body>
</html>
Bước 3: HTML lựa chọn - Code:
-
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Câu hỏi</title>
</head>
<body style="font-family: Tahoma; font-size: 10pt">
<p align="center"><font size="2"><script src="[color=#41cf3a]HTML đáp án[/color]">
</script>
<script>
/*
JavaScript Quiz-
By Website Abstraction([url=http://www.wsabstract.com%29]www.wsabstract.com)[/url]
Over 200+ free scripts here!
*/
var actualchoices=new Array()
document�cookie="ready=yes"
</script>
</font><b><font size="4">Hiểu biết của bạn về Clan & Đột kích</font></b></p>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td width="100%"><form method="POST" action="--WEBBOT-SELF--" name="myquiz">
<div
align="center"><center><table border="0" width="700" cellspacing="0" cellpadding="0">
<tr>
<td width="49%" valign="top" align="left"><table border="0" width="100%" cellspacing="0"
cellpadding="0">
<tr>
<td width="100%"
bgcolor="green"><strong><font size="2">1) Trong Đột kích
QCMM có nghĩa là gì?</font></strong></td>
</tr>
<tr>
<td width="100%"><table border="1" width="100%" cellpadding="0" cellspacing="0">
<tr>
<td width="89%"><font size="2">a) Quảng cáo mắm mực</font></td>
<td width="11%"><font size="2"><input type="radio" value="v1" name="q1"
onClick="actualchoices[1]='a'"></font></td>
</tr>
<tr>
<td width="89%"><font size="2">b) Quả cầu moi móc</font></td>
<td width="11%"><font size="2"><input type="radio" value="V2" name="q1"
onClick="actualchoices[1]='b'"></font></td>
</tr>
<tr>
<td width="89%"><font size="2">c) Quay *** mày</font></td>
<td width="11%"><font size="2"><input type="radio" value="V3" name="q1"
onClick="actualchoices[1]='c'"></font></td>
</tr>
<tr>
<td width="89%"><font size="2">d) Quả cầu may mắn</font></td>
<td width="11%"><font size="2"><input type="radio" value="V4" name="q1"
onClick="actualchoices[1]='d'"></font></td>
</tr>
</table>
</td>
</tr>
</table>
<p> </p>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td width="100%"
bgcolor="green"><strong><font size="2">3) VTC nghĩa là
gì?</font></strong></td>
</tr>
<tr>
<td width="100%"><table border="1" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td width="89%"><font size="2">a) Vô tổ chức</font></td>
<td width="11%"><font size="2"><input type="radio" value="V1" name="q3"
onClick="actualchoices[3]='a'"></font></td>
</tr>
<tr>
<td width="89%"><font size="2">b) Vét tiền của</font></td>
<td width="11%"><font size="2"><input type="radio" value="V2" name="q3"
onClick="actualchoices[3]='b'"></font></td>
</tr>
<tr>
<td width="89%"><font size="2">c) Vịt tạp chủng</font></td>
<td width="11%"><font size="2"><input type="radio" value="V3" name="q3"
onClick="actualchoices[3]='c'"></font></td>
</tr>
<tr>
<td width="89%"><font size="2">d) Vietnam Television Corporation</font></td>
<td width="11%"><font size="2"><input type="radio" value="V4" name="q3"
onClick="actualchoices[3]='d'"></font></td>
</tr>
</table>
</td>
</tr>
</table>
<p> </p>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td width="100%"
bgcolor="green"><strong><font size="2">5) Game Đột kích
ra mắt thị trường VN ngày:</font></strong></td>
</tr>
<tr>
<td width="100%"><table border="1" width="100%" cellspacing="0" cellpadding="0"
height="82">
<tr>
<td width="89%" height="21"><font size="2">a) 18/03/2008</font></td>
<td width="11%" height="21"><font size="2"><input type="radio" value="V1" name="q5"
onClick="actualchoices[5]='a'"></font></td>
</tr>
<tr>
<td width="89%" height="19"><font size="2">b) 17/03/2008</font></td>
<td width="11%" height="19"><font size="2"><input type="radio" value="V2" name="q5"
onClick="actualchoices[5]='b'"></font></td>
</tr>
<tr>
<td width="89%" height="21"><font size="2">c) 17/04/2008</font></td>
<td width="11%" height="21"><font size="2"><input type="radio" value="V3" name="q5"
onClick="actualchoices[5]='c'"></font></td>
</tr>
<tr>
<td width="89%" height="21"><font size="2">d) 19/04/2008</font></td>
<td width="11%" height="21"><font size="2"><input type="radio" value="V4" name="q5"
onClick="actualchoices[5]='d'"></font></td>
</tr>
</table>
</td>
</tr>
</table>
<p> </p>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td width="100%"
bgcolor="green"><strong><font size="2">7) Nhân vật có
vòng 1 bựa nhất Đột kích</font></strong></td>
</tr>
<tr>
<td width="100%"><table border="1" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td width="89%"><font size="2">a) Fox Ranger</font></td>
<td width="11%"><font size="2"><input type="radio" value="V1" name="q7"
onClick="actualchoices[7]='a'"></font></td>
</tr>
<tr>
<td width="89%"><font size="2">b) Delta</font></td>
<td width="11%"><font size="2"><input type="radio" value="V2" name="q7"
onClick="actualchoices[7]='b'"></font></td>
</tr>
<tr>
<td width="89%"><font size="2">c) Rose</font></td>
<td width="11%"><font size="2"><input type="radio" value="V3" name="q7"
onClick="actualchoices[7]='c'"></font></td>
</tr>
<tr>
<td width="89%"><font size="2">d) Lady Ranger</font></td>
<td width="11%"><font size="2"><input type="radio" value="V4" name="q7"
onClick="actualchoices[7]='d'"></font></td>
</tr>
</table>
</td>
</tr>
</table>
<p> </p>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td width="100%"
bgcolor="green"><strong><font size="2">9) Địa chỉ trang
forum clan battuvuong là:</font></strong></td>
</tr>
<tr>
<td width="100%"><table border="1" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td width="89%"><font size="2">a) http://club.zooz.vn/cf/battuvuong</font></td>
<td width="11%"><font size="2"><input type="radio" value="V1" name="q9"
onClick="actualchoices[9]='a'"></font></td>
</tr>
<tr>
<td width="89%"><font size="2">b) http://battuvuong.forumclan.com</font></td>
<td width="11%"><font size="2"><input type="radio" value="V2" name="q9"
onClick="actualchoices[9]='b'"></font></td>
</tr>
<tr>
<td width="89%"><font size="2">c) http://cfviet.co.cc</font></td>
<td width="11%"><font size="2"><input type="radio" value="V3" name="q9"
onClick="actualchoices[9]='c'"></font></td>
</tr>
<tr>
<td width="89%"><font size="2">d) http://diendan.zooz.vn/forum/battuvuong</font></td>
<td width="11%"><font size="2"><input type="radio" value="V4" name="q9"
onClick="actualchoices[9]='d'"></font></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
<td width="2%" valign="top" align="left"></td>
<td width="49%" valign="top" align="left"><table border="0" width="100%" cellspacing="0"
cellpadding="0">
<tr>
<td width="100%"
bgcolor="green"><strong><font size="2">2) Khẩu súng ngắm
bắn nhanh nhất Đột kích</font></strong></td>
</tr>
<tr>
<td width="100%"><table border="1" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td width="89%"><font size="2">a) MSG90</font></td>
<td width="11%"><font size="2"><input type="radio" value="V1" name="q2"
onClick="actualchoices[2]='a'"></font></td>
</tr>
<tr>
<td width="89%"><font size="2">b) DRAGUNOV</font></td>
<td width="11%"><font size="2"><input type="radio" value="V2" name="q2"
onClick="actualchoices[2]='b'"></font></td>
</tr>
<tr>
<td width="89%"><font size="2">c) PSG-1 RedDragon
</font></td>
<td width="11%"><font size="2"><input type="radio" value="V3" name="q2"
onClick="actualchoices[2]='c'"></font></td>
</tr>
<tr>
<td width="89%"><font size="2">d) AWM - RedDragon</font></td>
<td width="11%"><font size="2"><input type="radio" value="V4" name="q2"
onClick="actualchoices[2]='d'"></font></td>
</tr>
</table>
</td>
</tr>
</table>
<p> </p>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td width="100%"
bgcolor="green"><strong><font size="2">4) Vô địch VEC
2009 bộ môn Đột kích?</font></strong></td>
</tr>
<tr>
<td width="100%"><table border="1" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td width="89%"><font size="2">a) ARS</font></td>
<td width="11%"><font size="2"><input type="radio" value="V1" name="q4"
onClick="actualchoices[4]='a'"></font></td>
</tr>
<tr>
<td width="89%"><font size="2">b) FREE</font></td>
<td width="11%"><font size="2"><input type="radio" value="V2" name="q4"
onClick="actualchoices[4]='b'"></font></td>
</tr>
<tr>
<td width="89%"><font size="2">c) Diamond</font></td>
<td width="11%"><font size="2"><input type="radio" value="V3" name="q4"
onClick="actualchoices[4]='c'"></font></td>
</tr>
<tr>
<td width="89%"><font size="2">d) 1st.Dragon</font></td>
<td width="11%"><font size="2"><input type="radio" value="V4" name="q4"
onClick="actualchoices[4]='d'"></font></td>
</tr>
</table>
</td>
</tr>
</table>
<p> </p>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td width="100%"
bgcolor="green"><strong><font size="2">6) baivong là viết
tắt của từ:</font></strong></td>
</tr>
<tr>
<td width="100%"><table border="1" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td width="89%"><font size="2">a) Bãi Vòng</font></td>
<td width="11%"><font size="2"><input type="radio" value="V1" name="q6"
onClick="actualchoices[6]='a'"></font></td>
</tr>
<tr>
<td width="89%"><font size="2">b) bại vong</font></td>
<td width="11%"><font size="2"><input type="radio" value="V2" name="q6"
onClick="actualchoices[6]='b'"></font></td>
</tr>
<tr>
<td width="89%"><font size="2">c) bái vọng</font></td>
<td width="11%"><font size="2"><input type="radio" value="V3" name="q6"
onClick="actualchoices[6]='c'"></font></td>
</tr>
<tr>
<td width="89%"><font size="2">d) Không có đáp án</font></td>
<td width="11%"><font size="2"><input type="radio" value="V4" name="q6"
onClick="actualchoices[6]='d'"></font></td>
</tr>
</table>
</td>
</tr>
</table>
<p> </p>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td width="100%"
bgcolor="green"><strong><font size="2">8) Sau khi lên cấp
thiếu tướng 8 được tặng</font></strong></td>
</tr>
<tr>
<td width="100%"><table border="1" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td width="89%"><font size="2">a) Katana gold</font></td>
<td width="11%"><font size="2"><input type="radio" value="V1" name="q8"
onClick="actualchoices[8]='a'"></font></td>
</tr>
<tr>
<td width="89%"><font size="2">b) 100.000 Gp</font></td>
<td width="11%"><font size="2"><input type="radio" value="V2" name="q8"
onClick="actualchoices[8]='b'"></font></td>
</tr>
<tr>
<td width="89%"><font size="2">c) Bảng tên Rồng đỏ</font></td>
<td width="11%"><font size="2"><input type="radio" value="V3" name="q8"
onClick="actualchoices[8]='c'"></font></td>
</tr>
<tr>
<td width="89%"><font size="2">d) Éo cóa gì!</font></td>
<td width="11%"><font size="2"><input type="radio" value="V4" name="q8"
onClick="actualchoices[8]='d'"></font></td>
</tr>
</table>
</td>
</tr>
</table>
<p> </p>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td width="100%"
bgcolor="green"><strong><font size="2">10) Clan
battuvuong được thành lập cách
đây:</font></strong></td>
</tr>
<tr>
<td width="100%"><table border="1" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td width="89%"><font size="2">a) Khoảng 6 tháng</font></td>
<td width="11%"><font size="2"><input type="radio" value="V1" name="q10"
onClick="actualchoices[10]='a'"></font></td>
</tr>
<tr>
<td width="89%"><font size="2">b) Dưới 4 tháng</font></td>
<td width="11%"><font size="2"><input type="radio" value="V2" name="q10"
onClick="actualchoices[10]='b'"></font></td>
</tr>
<tr>
<td width="89%"><font size="2">c) Khoảng 10 tháng</font></td>
<td width="11%"><font size="2"><input type="radio" value="V3" name="q10"
onClick="actualchoices[10]='c'"></font></td>
</tr>
<tr>
<td width="89%"><font size="2">d) Hơn 1 năm</font></td>
<td width="11%"><font size="2"><input type="radio" value="V4" name="q10"
onClick="actualchoices[10]='d'"></font></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</center></div>
</form>
</td>
</tr>
</table>
<form method="POST" action="--WEBBOT-SELF--">
<!--webbot bot="SaveResults" startspan
U-File="E:\BaiViet\javascript\_private\form_results.txt" S-Format="TEXT/CSV"
S-Label-Fields="TRUE" --><!--webbot bot="SaveResults" endspan --><div
align="center"><center><p><font size="2"><!--webbot bot="HTMLMarkup" startspan -->
<script language="JavaScript1.1">
var incorrect=null
for (t=1;t<=10;t++){
for (t2=0;t2<=3;t2++)
eval("document.myquiz.q"+t+"["+t2+"]").checked=false
}
function gradeit(){
var incorrect=null
for (i=1;i<=10;i++){
if (actualchoices[i]!=correctchoices[i]){
if (incorrect==null)
incorrect=i
else
incorrect+="/"+i
}
}
if (incorrect==null)
incorrect="a/b"
document�cookie='q='+incorrect
if (document�cookie=='')
alert("Your browser does not accept cookies. Please adjust your browser settings.")
else
window.location="[color=#41cf3a]HTML kết quả[/color]"
}
</script><input type="button" value="Trả lời !" name="B1"
onClick="gradeit()"></font></p>
</center></div>
</form>
<p
align="center"><a href="http://cfviet.co.cc"><font
size="2">Clan battuvuong</font></a></p>
</body>
</html>
<!--webbot bot="HTMLMarkup" endspan -->
</form>