Using eval() to set global variables

后端 未结 3 1000
耶瑟儿~
耶瑟儿~ 2020-12-21 00:12

My code to set a global variable using eval is not working. It\'s as if the assignment is not called at all, but no script errors occur.



        
3条回答
  •  [愿得一人]
    2020-12-21 01:01

    Eval runs locally, you're setting a local variable.

    To set a global variable, remove var;

    
    

提交回复
热议问题