日期:2014-05-16 浏览次数:20389 次
TextBox1.value=TextBox1.value + " " + String.fromCharCode(event.keyCode);
<input type="text" id="txt" />
<script>
document.onkeypress = function (e) {
e = e
------解决方案--------------------
window.event;
txt.value += ' ' + String.fromCharCode(e.keyCode
------解决方案--------------------
e.which);
}
</script>