Last active
October 24, 2024 08:22
-
-
Save canerbasaran/9440338 to your computer and use it in GitHub Desktop.
Rastgele TC Kimlik No Üreticisi (javascript)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- | |
Rastgele TC Kimlik No Üreticisi | |
Random Turkish Identification Number Generator | |
https: //github.com/CanerBasaran | |
--> | |
<html><p id="tc"></p> | |
<script type="text/javascript"> | |
var tcno = "" + Math.floor(900000001 * Math.random() + 1e8), | |
list = tcno.split("").map(function(t) { | |
return parseInt(t, 10) | |
}), | |
tek = list[0] + list[2] + list[4] + list[6] + list[8], | |
cift = list[1] + list[3] + list[5] + list[7], | |
tc10 = (7 * tek - cift) % 10; | |
document.getElementById("tc").textContent = tcno + ("" + tc10) + ("" + (cift + tek + tc10) % 10) | |
</script></html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Burada görebilirsin https://canerbasaran.github.io/yazilim/rastgele-tc-kimlik-no-uretici.html