以下代码:
var str= "<strong>English Comprehension<\/strong>
<br\/>
<ul>
<li> Synonyms/Antonyms/Word Meaning (Vocabulary)<\/li>
<li> Complete the Sentence (Grammar)<\/li>
<li> Spot error/Correct sentence (Grammar/sentence construction)<\/li>
<li> Sentence Ordering (Comprehension skills)<\/li>
<li> Questions based on passage (Comprehension skills)<\/li>
<\/ul>
<br\/>";
出现错误:"unterminated string literal"。问题出在哪里?
\/
?斜杠并不是特殊字符,不需要进行转义。 - Felix Kling