Javascript - eval() `{}` expression

前端 未结 3 730
面向向阳花
面向向阳花 2021-01-24 04:13

Why can a string like \"{opacity: 1.0, width: \'132px\'}\" not be evaluated using eval() as is?

eval(\"{opacity: 1.0, width: \'132px\'}         


        
3条回答
提交回复
热议问题