当前位置:网站首页>Uncaught SyntaxError: Octal literals are not allowed in strict mode.
Uncaught SyntaxError: Octal literals are not allowed in strict mode.
2022-07-25 13:23:00 【刺心疯】
js控制台报错:Uncaught SyntaxError: Octal literals are not allowed in strict mode.
代码场景:

错误原因是:JS严格模式禁止使用八进制字面量,在我的if判断中使用了0开头的001,并且不是字符串。
改成下面就解决了:

这就解决这个报错问题了!
温馨提示:开发中还是要严格根据跟后台商量好的数据类型来写代码
边栏推荐
- 从输入网址到网页显示
- OAuth, JWT, oidc, you mess me up
- Online Learning and Pricing with Reusable Resources: Linear Bandits with Sub-Exponential Rewards: Li
- 备战2022 CSP-J1 2022 CSP-S1 初赛 视频集
- 录制和剪辑视频,如何解决占用空间过大的问题?
- 电脑里一辈子都不想删的神仙软件
- Prepare for 2022 csp-j1 2022 csp-s1 preliminaries video set
- VIM tip: always show line numbers
- JS Array indexOf includes sort() 冒号排序 快速排序 去重和随机样本 random
- 卷积神经网络模型之——VGG-16网络结构与代码实现
猜你喜欢

6.27 uniapp项目历程

Brpc source code analysis (III) -- the mechanism of requesting other servers and writing data to sockets

并发编程 — 内存模型 JMM

uniapp处理后台传输图片

IM系统-消息流化一些常见问题

Shell common script: check whether a domain name and IP address are connected

Install mujoco and report an error: distutils.errors DistutilsExecError: command ‘gcc‘ failed with exit status 1

安装mujoco报错:distutils.errors.DistutilsExecError: command ‘gcc‘ failed with exit status 1

MLIR原理与应用技术杂谈

卷积神经网络模型之——AlexNet网络结构与代码实现
随机推荐
简单了解流
Leetcode 113. 路径总和 II
Brpc source code analysis (III) -- the mechanism of requesting other servers and writing data to sockets
Introduction to web security UDP testing and defense
并发编程之AQS
Numpy快速入门
Django 2 ----- database and admin
Esp32-c3 is based on blinker lighting control 10 way switch or relay group under Arduino framework
[Video] Markov chain Monte Carlo method MCMC principle and R language implementation | data sharing
The interviewer asked me: how much do you know about MySQL's storage engine?
How to solve the problem of taking up too much space when recording and editing videos?
安装mujoco报错:distutils.errors.DistutilsExecError: command ‘gcc‘ failed with exit status 1
卷积神经网络模型之——GoogLeNet网络结构与代码实现
Mlx90640 infrared thermal imager temperature sensor module development notes (V)
JS Array indexOf includes sort() 冒号排序 快速排序 去重和随机样本 random
Summary of Niuke forum project deployment
IM系统-消息流化一些常见问题
Docker learning - redis cluster -3 master and 3 slave - capacity expansion - capacity reduction building
Emqx cloud update: more parameters are added to log analysis, which makes monitoring, operation and maintenance easier
Date and time function of MySQL function summary