当前位置:网站首页>错误提示:Syntax error on token “function”, delete this token
错误提示:Syntax error on token “function”, delete this token
2022-08-09 23:05:00 【全栈程序员站长】
大家好,又见面了,我是你们的朋友全栈君。
想要重写onkeydown()函数,但是却出现了如下提示:
将上面的定义方法修改为
<script type="text/javascript">
document.onkeydown = function() {
if(event.keyCode == 13 && event.srcElement.type != "button") {
event.keyCode = 9;
}
}
</script>
这样问题就解决了,但是这是为什么呢?
发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/105706.html原文链接:https://javaforall.cn
边栏推荐
- conda新建环境时报错NotWritableError: The current user does not have write permissions
- LiveData : Transformations.map and Transformations.switchMap usage
- ES6 从入门到精通 # 14:迭代器 Iterator 的用法
- MQTT X Web:在线的 MQTT 5.0 客户端工具
- selenium和驱动安装
- NTP SERVICE TASK 在GWserver配置、启用NTP服务,为当前环境提供时钟同步服务,Client主机可以从该服务器同步时间。
- 【渗透工具】浏览器数据导出工具
- JS基础笔记-关于对象
- 【诗歌】爱你就像爱生命
- AirFlow介绍
猜你喜欢
ES6 从入门到精通 # 14:迭代器 Iterator 的用法
【集训DAY4】询问【Hash】
了解什么是架构基本概念和架构本质
ES6 Beginner to Mastery #13: Extension Methods for Arrays 2
经济衰退即将来临前CIO控制成本的七种方法
【集训DAY5】选数字【数学】
GoLang 使用 goroutine 停止的几种办法
共创 Ray 中文社区,Ray Forward Meetup 2022 直播邀你参加!
Explore the TiDB Lightning source code to solve the found bugs
【渗透工具】浏览器数据导出工具
随机推荐
蔚来杯2022牛客暑期多校训练营7 CFGJ
【励志】名言警句
conda新建环境时报错NotWritableError: The current user does not have write permissions
NTU General Database-Gbase-8a-Learning-04-Deploying Distributed Clusters
数字孪生电力系统,可视化应用实现科学调度的电子设备
Travel with Shengteng: See all the AI attractions in Jinling City in one day
2022-08-09 mysql/stonedb-subquery performance improvement-introduction
[JZOF] 82 binary tree with a path of a certain value (1)
Click: 518. Change Exchange II
【诗歌】被讨厌的勇气
Distributed database problem (3): data consistency
《GB5084-2021》PDF下载
经济衰退即将来临前CIO控制成本的七种方法
68. qt quick-qml multi-level folding drop-down navigation menu supports dynamic add/unload, support qml/widget loading, etc.
Digital wallets, red sea ecological rapid introduction of small programs can help capture device entry wisdom
CAD 绘制圆角处理
The latest "Grain Academy Development Tutorial" in 2022: 10 - Front-end payment module
MQTT X Web:在线的 MQTT 5.0 客户端工具
GoLang 使用 goroutine 停止的几种办法
ES6 从入门到精通 # 14:迭代器 Iterator 的用法