首页
技术博客
登录
6mi
u
盘
搜
搜 索
技术博客
js判断变量是否存在
js判断变量是否存在
tech
2025-06-06
11
if
(
typeof
(
data
)
!=
"undefined"
)
注:只能判断一层变量,例如:data。如果data不存在不能判断data.code,会导致报错。
转载请注明原文地址:https://tech.qufami.com/read-22482.html
最新回复
(
0
)