<form name="form1" method="post" action="">
<script language="javascript">
function idcitizen(){
var n1=parseInt(document.form1.n1.value)*13;
var n2=parseInt(document.form1.n2.value)*12;
var n3=parseInt(document.form1.n3.value)*11;
var n4=parseInt(document.form1.n4.value)*10;
var n5=parseInt(document.form1.n5.value)*9;
var n6=parseInt(document.form1.n6.value)*8;
var n7=parseInt(document.form1.n7.value)*7;
var n8=parseInt(document.form1.n8.value)*6;
var n9=parseInt(document.form1.n9.value)*5;
var n10=parseInt(document.form1.n10.value)*4;
var n11=parseInt(document.form1.n11.value)*3;
var n12=parseInt(document.form1.n12.value)*2;
var n13=parseInt(document.form1.n13.value);
var total=n1+n2+n3+n4+n5+n6+n7+n8+n9+n10+n11+n12;
//alert(total);
var total2=parseInt(total)%11;
//alert(total2);
var total3=11-parseInt(total2);
//alert(total3);
if(parseInt(total3)!=n13){
alert("....");
}else{
alert("ถูกต้องน่ะคร้าาาาบ 0/");
}