The eval problem occurred when processing the ajax callback function return value. it has been detected and processed successfully: var & nbsp; reseval ([{fid: 3, sid: 3, sonName: 1st chemistry}, {content: & lt; p & gt; & lt; img & nbsp; alt & nbsp; srclist. image. eval problems when processing the return value of the baid ajax callback function
Detected and processed:
Var res = eval ("(" [{"fid": "3", "sid": "3", "sonName": "1st chemistry "}, {"content ":'
Wwwwrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrqqq
'}, {"Content ":'
Bytes
'}] ")");
Failed to be detected (not executed): var res = eval ("("
[{"Fid": "3", "sid": "10", "sonName": "4th chemistry" },{ "content ":'
'}, {"Content ":'
Dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd
Sdddddddddddddddddddddddddd
'}]
")");
Let's take a look at why eval cannot be used to process the second ajax return value?
------ Solution --------------------
JavaScript strings do not contain line breaks. if necessary, escape them.