2011-03-17 175 views

回答

-3
var unicode=e.keyCode? e.keyCode : e.charCode; 
typing = document.getElementById('textbox').value + String.fromCharCode(unicode); 
+1

廢話。你的問題和你的答案。失之偏頗。 – 2013-03-03 20:08:22

16

您的活動火災之前信件已註冊。你應該使用onkeyup event。它踢入您鬆開鍵

4

JavaScript之後:

function h(x) 
{ 
    alert(x); 
} 

HTML代碼:

<input onkeyup=h(this.value) type=text> 
相關問題