"Nöbet Hesaplama Programı"
Bootstrap 4.1.1 Snippet by pcmy

<link href="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js"></script> <script src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <!------ Include the above in your HEAD tag ----------> <form class="form-horizontal" name= "nobetformu"> <fieldset> <!-- Form Name --> <legend>Nöbet Ücreti Hesaplama</legend> <!-- Select Basic --> <div class="form-group"> <label class="col-md-4 control-label" for="selectbasic">Yıl</label> <div class="col-md-4"> <select id="selectbasic" name="selectbasic" class="form-control"> <option value="1">2021</option> </select> </div> </div> <!-- Select Basic --> <div class="form-group"> <label class="col-md-4 control-label" for="selectbasic">Ünvanı</label> <div class="col-md-4"> <select id="selectbasic" name="selectbasic" class="form-control"> <option value="bos" selected>Lütfen Seçim Yapınız.</option> <option value="uzman">Uzman Tabip</option> <option value="pratisyen">Pratisyen Tabip</option> </select> </div> </div> <!-- Text input--> <div class="form-group"> <label class="col-md-4 control-label" for="normalnobet">Normal Nöbet</label> <div class="col-md-4"> <input id="textinput" name="textinput" type="text" onKeyUp="SayisalDeger(this);" placeholder="Nöbet Saati" class="form-control input-md"> </div> </div> <!-- Text input--> <div class="form-group"> <label class="col-md-4 control-label" for="acilnobet">Ameliyathane Diyaliz Yoğun Bakım Acil Servis 112 vb.</label> <div class="col-md-4"> <input id="textinput" name="textinput" type="text" onKeyUp="SayisalDeger(this);" placeholder="Nöbet Saati" class="form-control input-md"> </div> </div> <!-- Text input--> <div class="form-group"> <label class="col-md-4 control-label" for="Hesaplama">Hesaplama Sonucu</label> <div class="col-md-4"> <input id="sonucu" name="islemsonucu" type="text" placeholder="Nöbet Ücreti" class="form-control input-md"> </div> </div> <!-- Button (Double) --> <div class="form-group"> <label class="col-md-4 control-label" for="hesapla"></label> <div class="col-md-8"> <button id="hesapla" type="button" name="hesapla" class="btn btn-success" onclick="Hesapla()" >Hesapla</button> <button id="reset" name="reset" class="btn btn-danger">Temizle</button> </div> </div> </fieldset> </form>
function Hesapla() { var unvani = document.nobetformu.unvan.value; var normalnobet = document.nobetformu.normalnobet.value; var acilnobet = document.nobetformu.acilnobet.value; var diniacil = document.nobetformu.diniacil.value; var dininormal = document.nobetformu.dininormal.value; var checkednormal = document.nobetformu.normalcheck.value; var maaskatsayi = 0.130597; var damgavergisi= 0.00759; var uzmankatsayi = 150; var prakatsayi = 135; var diskatsayi = 120; var syokatsayi = 90; var slisekatsayi = 75; var digerkatsayi = 55; if (unvani=='uzman' && normalnobet!=='') { var unn = ((maaskatsayi * uzmankatsayi)- ((maaskatsayi * uzmankatsayi)* damgavergisi)) * parseInt(normalnobet); document.nobetformu.sonucu.value = (unn.toFixed(2) + " "+"TL"); } else { document.nobetformu.sonucu.value = ("Lütfen Hesaplama Yapacağınız Kutucuğu İşaretleyiniz."); } } function SayisalDeger(nesne) { var Gecerlikaraketer = "0123456789."; var Sayisal=true; var Kisim; for (i = 0; i < nesne.value.length && Sayisal === true; i++) { Kisim = nesne.value.charAt(i); if (Gecerlikaraketer.indexOf(Kisim) == -1) { // alert('Lütfen Sadece Sayisal Deger Giriniz') nesne.value = nesne.value.substring(0,i); break; } } return Sayisal; }

Related: See More


Questions / Comments: