在Internet Explorer 7中的输入字段上触发键盘事件 [英] Triggering keyup event on input field in Internet Explorer 7

查看:156
本文介绍了在Internet Explorer 7中的输入字段上触发键盘事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

基本上我在输入元素上触发keyup事件有问题。在Firefox中它可以工作,但在IE7(或IE 7模式下的IE 8)中却没有。有没有办法让这个工作(最好是在jQuery中)?

Basically I have a problem with triggering keyup event on input element in. In Firefox it works but in IE7 (or IE 8 in IE 7 mode) it doesn't. Is there a way to make this work (preferably in jQuery)?

我想要 console 来打印测试每种类型我打了一封信。

I want console to print test each type I type a letter.

编辑:匆匆我忘了强制性的jsFiddle链接 -
http://jsfiddle.net/sWfNw/3/

In hurry I forgot the obligatory jsFiddle link - http://jsfiddle.net/sWfNw/3/

好的,这里是警报,应该在IE中工作无论版本如何,如果我没记错的话。

Ok, here is alert which should work in IE regardless of version if I recall correctly.

推荐答案

大家好,谢谢你们的帮助,但迈克尔·斯旺说得对,IE7没有' t支持控制台,这就是错误。

Hi guys thanks for the help, but Michael Swan got it right, IE7 doesn't support console and that was the bug.

这篇关于在Internet Explorer 7中的输入字段上触发键盘事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆