kuangbaoxu 发表于 2013-1-27 05:15:57

注意字符串中的 "\"

/*官网原文:   JScript allows C-style escaped newlines in string literals; according to ES3 this would be a syntax error for unterminated string constant   Example:*/ <script>       var s = "this is a \                multiline string"; </script> /*    Output:             IE: taken as a single string.             FF: same as IE Opera: same as IE             Safari: same as IE IE eats away the IE eats away the"\" and the character following it. The s.length will evaluate to 34 (this includes the leading blanks in the second line). FF, Opera and Safari emulate IE.*/
页: [1]
查看完整版本: 注意字符串中的 "\"