JSFiddle - React, Tailwind, and code Playground
by BilisimOgretmeni
HTML
<!DOCTYPE HTML>
<html>
<head>
<meta charset="UTF-8">
<title>www.bilisimogretmeni.com</title>
<script type="text/javascript">
function kontrol(form){
var hata = [];
if ( !CheckBoxkontrol(form.terms) ) {
hata[hata.length] = "Lisans Sözlemisini Kabul edin";
}
if (hata.length > 0) {
hatakontrol(hata);
return false;
}
return true;
}
function CheckBoxkontrol(cb){
return cb.checked;
}
function hatakontrol(hata){
var msg = "Hataları düzeltip tekrar deneyin...\n";
var numError;
for (var i = 0; i<hata.length; i++) {
numError = i + 1;
msg += "\n" + numError + ". " + hata[i];
}
alert(msg);
}
</script>
</head>
<body>
<h1>Lisans Sözleşmesi</h1>
<form method="post" action="islem.html" onsubmit="return kontrol(this);">
<input type="checkbox" name="terms">
Lisan sözleşmesini okudum ve kabul ettim
<br><br>
<input type="submit" value="Gönder">
</form>
</body>
</html>