Olası Çoğalt kullanarak bastırdı girin: Ben mysql ve php kullanarak cevap fonksiyonu üzerinde çalışıyorum
Javascript capture keyAlgılama anahtar JavaScript'i
.
MySQL db:
reply:
rid - id;
topicid - under which topic;
uid - id of the guy who replies;
content - what did the guy said.
İşte benim html kod:
<form id="replyform">
<textarea name="rplcont" placeholder="Press enter to submit your reply."><textarea>
</form>
Sorum şu: düğmesine girmek olmadığını nasıl basılır biliyoruz?
Çok teşekkürler.
/--------------------------------------------
html:
<textarea id="reply" name="reply" onKeyPress="enterpressalert(event, this)"></textarea>
js:
function enterpressalert(e, textarea){
var code = (e.keyCode ? e.keyCode : e.which);
if(code == 13) { //Enter keycode
alert('enter press');
}
}
ve işe yarıyor -/
burada çalışmak benim kodlarını bu.
Bu konuyu ilgilendiren herkese teşekkürler!
Her yerde yineler! http://stackoverflow.com/search?q=enter+key+javascript – elclanrs
İlgili bilgileri burada bulabilirsiniz: http://stackoverflow.com/questions/239082/javascript-login-form-doesnt-submit-when-user -hits- –
@VishalSuthar girin: Teşekkürler, gerçekten cömertsiniz. Şu an okuyorum .. – Matt