gpt4 book ai didi

javascript - Internet Explorer 将 e.which 显示为未定义

转载 作者:行者123 更新时间:2023-11-30 07:27:12 25 4
gpt4 key购买 nike

Internet Explorer 8 中,event.which 显示 undefined 并且在 FireFox 和 IE 9 中工作正常.我正在使用 Textbox 'onkeypress' 事件

标记

<asp:TextBox runat="server" ID="tb1" MaxLength="3"
onkeypress="return MainCheckStrings(event);" />

它在 FF、Chrome、Safari 和 Internet Explorer 中运行良好 - 9

有什么想法吗?

最佳答案

var charCode = evt.which || evt.keyCode;

关于javascript - Internet Explorer 将 e.which 显示为未定义,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10315260/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com