JS front-end Code Some encrypted JS such as JScript. encode has been cracked for a long time because it must be parsed in IE plain text. There are also some encryption methods, through complex transformations, to change the source code, but eventually all escape the final trial, such as Unescape, document. Write, Eval statement to restore. The best way to protect JavaScript code is obfuscation. The goal of obfuscation is to make it easier to read and write code than to write code directly. obfuscation is not non-cracking, but increases the cracking cost, java and C # encryption adopts obfuscation. In this way, obfuscation of very core code cannot protect the code, but does JS have such code? Ben Program The principle of compilation is not used. The idea of Word Segmentation analysis is based on mechiland (http://www.jzchen.net) code highlighting program.
<Textarea id = "runcode2344"> <meta content = "mshtml 6.00.2800.1528" name = "generator"> <meta content = "" name = "author"> <meta content = "" name = "keywords"> <meta content = "" name = "Description"> <textarea id = "code" rows = "12" Cols = "100"> <br/> /* <br/> This is a class <br/> */<br/> function XX (Num, str) <br/>{< br/> // description <br/> var A = num; <br/> This. AA = A; <br/> This. BB = function () {alert (STR) ;}< br/> This. cc = function () {for (VAR I = 0; I <br/> <input onclick = "Go () "type =" button "value =" go "> <textarea id =" display "rows =" 12 "Cols =" 100 "> </textarea>