现在的位置: 首页 > 综合 > 正文

JS onkeydown事件

2012年09月29日 ⁄ 综合 ⁄ 共 169字 ⁄ 字号 评论关闭

<input id="Count"  type="text"  onkeydown="Test()" />

 

JS代码:

  function Test()
{

   document.getElementById("Count").value

}

在执行onkeydown事件的时候,第一次按下键盘的时候,我获得值为什么都为空?要按键盘两次才有值?

需要怎么处理?

抱歉!评论已关闭.