javascript error unterminated string constant is reported as a cause of

js always reported unterminated string constant, the page can be a normal show, I do not know where the are wrong, are displayed because JTableTree, that their relations in the data on a problem, or the introduction of small JS files, Looking to find it? , nor how to find out. Later found one online that the characters are the problem, suddenly. . .

It turned out that their data storage to the oracle of time, are pasting from Excel into, JS Analysis of the data character set when the error happened. Excel will copy the data into Notepad first, and then copy the data, the problem resolved.

Conclusions (to quote from ):

If you use UTF-8 character set the page to preserve documents, must be prepared to tell the browser to use the same code to open, needs to be done is to add at the front page <meta http-equiv = "Content-Type" content = " text / html; charset = utf-8 "> with you that no matter what page document character set preservation, script error is not the case, but questions garbled. So the browser to read the document and display character set has a problem, read the character set used in the document itself is based on the character set is displayed if there is no explicit encoding specified by the browser settings of the language.

分类:AJAX 时间:2009-05-21 人气:2222
blog comments powered by Disqus


  • javascript js "unterminated string constant" error 2010-11-08

    JavaScript has always been a "unterminated string constant" error (Error code: 0), 2 in IE6.0 and travel there, but in Firefox, no problem. Reason: It is caused because the page encoding settings. My JavaScript code is written to a *. js file, j

  • On the "unterminated string constant" error solution to the problem (change) 2010-09-20

    Sample questions: document.write ('<table width=770 border=0 cellpadding=0 cellspacing=0> <tr> <td> <img src=../images/f_01.gif border=0 /> </ td> <td> <img src=../images/f_02.gif border=0 /> </ td> </ Tr

  • Unterminated string constant 2010-04-27

    Problem symptoms: Open the Web page on the prompt: Error: unterminated string constant For the above tips, there are several solutions: 1, coding websites using the same code should be uniform, such as utf-8 encoding; or gb2312; both choose and use,

  • javascript unterminated string constant 2010-06-25

    1.JAVASCRIPT reference, use the language the characters are inconsistent. For example: <script type="text/javascript" src="xxx.js" charset="UTF-8">. Xxx.js internal use of the GB2312 file format, outside calls using UTF

  • JavaScript Error: No end of string constants 2009-03-17

    Morning encountered a perplexing problem, the page below the prompt always has a yellow exclamation point icon, indicating the contents are "not the end of the string constant", what causes it? Think carefully JSP page should not be a problem, i

  • Classic troubleshooting process expected unqualified-id before string constant 2010-10-20

    The answer is: my code a little ";" ===================================== Site: Back to the line error and found no problem. Error file: ptlogin2_api.h (22 lines): expected unqualified-id before string constant In one of my cpp code in the middl

  • mysql输出数据赋给js变量报unterminated string literal错误原因 2014-09-04

    mysql 数据库数据赋给js变量报unterminated string literal错误原因 从mysql读取某一文本数据,付给js变量比如 <script type="text/javascript">var strs="苏润葡萄种植园依托沪宁高速和扬溧高速两大交通走廊,紧邻镇荣公路上党镇薛村段,离镇江市仅20公里,交通便利苏润葡萄种植园引进新品种. 新工艺.新技术和现代经营管理体制,采用大棚种植.目前主要品种有五个:夏黑.美人指.贵公子.黄蜜.金手指.苏

  • C language character constants in a string constant What is the difference 2010-04-20

    Single quotation marks in a character to character constants, such as: 'A' Character constants can be stored in a character variable, as seen in: char ch = 'a'; Double quotes in a string of characters in a string constant, such as: "A", "AB

  • javascript error in TRY .. CATCH processing usage. 2010-05-09

    Program development, programmers often face is how to write code to respond to error events that an exception (exception handlers). If the exception handling code designed to be comprehensive, then the final will be presented to the user a friendly i

iOS 开发

Android 开发

Python 开发



PHP 开发

Ruby 开发






Javascript 开发

.NET 开发



Copyright (C), All Rights Reserved. 版权所有 闽ICP备15018612号

processed in 0.034 (s). 14 q(s)