wangyuheng's Blog

time for change

  • Home
  • About
  • Tags
  • Categories
  • Archives
  • Table of Contents
  • Overview
  1. 1. 现象
  2. 2. 原因
  3. 3. 解决方法
wangyuheng

wangyuheng

天行健 男儿当立志!
110 posts
38 categories
103 tags
GitHub E-Mail

js对象调用属性时报错

Posted on 2016-09-03 Edited on 2016-12-09 In bug

转载请注明出处WangYuheng’s Blog

现象

js对象调用属性时报错

missing name after . operator

原因

用关键字 保留字 作为属性名,如 obj.static

解决方法

可以修改属性获取方式为 obj[‘static’]

Welcome to my other publishing channels
WeChat
# javascript # bug
linux tomcat starter
ie8不兼容stopPropagation
辽ICP备16008709号-1
© 2023 wangyuheng
Powered by Hexo & NexT.Gemini
0%