creativera adlı üyeden alıntı: mesajı görüntüle
arkadaşlar merhaba, input içerisinde ki veriyi normalde buton ile siliyordum ama buton iyi iş görmüyor bunu js ile silmeye çalışıyorum fakat beceremedim bir türlü
<input class="form-control mousetrap valid" id="weighing_scale_barcode" placeholder="Deneme1" name="weighing_scale_barcode" type="text" aria-invalid="false">
<script type="text/javascript">                            // Get the input fieldvar input = document.getElementById("weighing_scale_barcode");
// Execute a function when the user releases a key on the keyboardinput.addEventListener("keyup", function(event) {  // Number 13 is the "Enter" key on the keyboard  if (event.keyCode === 13) {    // Cancel the default action, if needed    event.preventDefault();    // Trigger the button element with a click    document.getElementById("weighing_scale_submit").click();  }});</script>
bu düzgün çalışıyor, click olayından sonra ne eklersem input value temizlenir. bir kaç clear denedim ama çalıştıramadım. butonu click yaptıktan sonra value değerin bir türlü silinmiyor. Yardımlarınız için teşekkür ederim
Jquery kullanabilirsin