Read about eval error, The latest news, videos, and discussion topics about eval error from alibabacloud.com
Eval ("1+2"),-> 3 The dynamic judgment of strings in source code is a very powerful language feature that is hardly necessary to be applied in practice. If you use eval (), you should carefully consider whether you really need to use it. One, eval
Code highlighting produced by Actipro Codehighlighter (freeware) http://www.codehighlighter.com/-->, first of all, a simple understanding .eval can execute a string generation statement, similar to the SQL exec (). What are the use cases for eval?
Eval ("1 + 2"),-> 3 The Dynamic Determination of strings in source code is a very powerful language feature and almost no need to be applied in practice. If you use eval (), you should carefully consider whether you really need to use it. 1. Whether
In IE, when eval encounters a function, there will be a strange situation in IE. We will explain it step by step using an example: Case 1: If there is no function in eval, directly execute: Eval ("alert ('ss');"); // all browsers output
The code must be executed globally in a recently written script. In this example, the window.exe script method is used in IE6, 8, and the window. Eval method is called for others. It seems very simple and runs correctly. The A declared by Eval is