Re: [Release] Online NRIC Generator
Posted: Sun Feb 21, 2010 3:58 pm
i've been like, using that for the past 3 months
The community that will never stop discussing!
https://xemectrum.guyz92.men/
Regarding to your MyKad's Number, You're from Selangor haa?? =DiSean wrote:Nope.....
I think you are a bit crazy...
It is always ends with 4 Digits Number...
Mine is
970314-10-XXXX
Birthdate - Country BP No. - The Number of People had made this Card (If Not wrong)
Here is the link of MyKad
http://en.wikipedia.org/wiki/MyKad
LOLiSean wrote:Nope.....
I think you are a bit crazy...
It is always ends with 4 Digits Number...
Mine is
970314-10-XXXX
Birthdate - Country BP No. - The Number of People had made this Card (If Not wrong)
Here is the link of MyKad
http://en.wikipedia.org/wiki/MyKad
Ya...there is an algorithm in javascript.iSean wrote:WTF? there's algorithm inside a javascript?
Code: Select all
function validate() {
var ic = document.form.textfield.value;
if (ic.length != 9) {
//alert("Please enter the IC number in the format:\n SXXXXXXXA");
document.form.textfield.focus();
return;
//return false;
}
var icArray = new Array(9);
for(i = 0; i < 9; i++) {
icArray[i] = ic.charAt(i);
}
icArray[1] *= 2;
icArray[2] *= 7;
icArray[3] *= 6;
icArray[4] *= 5;
icArray[5] *= 4;
icArray[6] *= 3;
icArray[7] *= 2;
var weight = 0;
for(i = 1; i < 8; i++) {
weight += parseInt(icArray[i]);
}
var offset=(icArray[0]=="T"||icArray[0]=="G")?4:0;
var temp=(offset+weight)%11;
var st=Array("J","Z","I","H","G","F","E","D","C","B","A");
var fg=Array("X","W","U","T","R","Q","P","N","M","L","K");
var theAlpha;
if (icArray[0]=="S"||icArray[0]=="T") { theAlpha=st[temp]; }
else if(icArray[0]=="F"||icArray[0]=="G") { theAlpha=fg[temp]; }
if (icArray[8] != theAlpha) {
document.getElementById("image").src="cross.gif";
//alert("Bad IC Number: " + ic);
}
else {
document.getElementById("image").src="tick.gif";
//alert("Good IC Number: " + ic);
}
}