2016-04-13 9 views

cevap

0

Yazılıma ilişkin anahtar sözcükler arıyorsunuz. Burada bulunan üzere

$("input").keyup(function(){ 
    $("input").css("background-color", "pink"); 
}); 

: W3-okullardan https://api.jquery.com/keyup/

Örnek: Aşağıdaki linke Bu konuda daha fazla bilgi bulabilirsiniz http://www.w3schools.com/jquery/event_keyup.asp

alternatif bir yöntem olacaktır

$(document).on('keyup' , '#yourElement' , function(){ 
// Do stuff here 
}); 
0

Yoksa aradığın şey bu mu? Anahtar işlevi, anahtarı bıraktığınız zaman ortaya çıkar.

$(document).ready(function() { 
 
    $('input').keyup(function(e) { 
 
    $('lable').text(e.keyCode); 
 
    }); 
 
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> 
 

 
Type in the input: 
 
<input type="text"><br/> 
 
Code of the pressed key: <lable></lable>

İlgili konular