Ana içeriğe atla

Html Option seçimine göre form elemanı gizleme kodu.

 Option seçimine göre form elemanı gizleme kodu.

 

JS 

<script>

function val() {

    d = document.getElementById("select_id").value;

if(d!=3){

document.getElementById("ammarHatirasi").style.display = "none";

}

else{

document.getElementById("ammarHatirasi").style.display = "block";

}

    

}

</script>

html:

Seçim Alanı:

  <label>Kayıt Türü:</label>

  <select onchange="val()" id="select_id" class="form-control">

  <option selected="">Lütfen Kayıt Türünüzü Seçiniz.</option>

                </select>

Gizlenecek alan:

</div> <!-- form-group end.// -->

<div id="ammarHatirasi" class="form-group" style="display: none;">

<label class="form-check form-check-inline">

  <input class="form-check-input " type="checkbox" value="" >

  <span class="form-check-label" > Talep Ediyorum. </span>

</label>

Yorumlar