12
OnKeyPress sırasında bir giriş metin kutusunun metni nasıl alınır?
Kullanıcı yazdıkça bir metin kutusundaki metni almaya çalışıyorum ( jsfiddle oyun alanı ): function edValueKeyPress() { var edValue = document.getElementById("edValue"); var s = edValue.value; var lblValue = document.getElementById("lblValue"); lblValue.innerText = "The text box contains: " + s; //var s = $("#edValue").val(); //$("#lblValue").text(s); } <input id="edValue" type="text" onKeyPress="edValueKeyPress()"><br> <span id="lblValue">The text …