我只是把一些HTML的變種,我得到這個錯誤:未捕獲 語法錯誤:意外的令牌非法未捕獲的SyntaxError:意外的標記非法當把HTML的變種
typeForm = "Type de RDV : <br />
<input type='radio' name='rdv-type' value='0' class='rdv-type' />Client seul<br />
<input type='radio' name='rdv-type' value='1' class='rdv-type' />Client + con<br />
<input type='radio' name='rdv-type' value='2' class='rdv-type' />Visite agence<br />
<input type='radio' name='rdv-type' value='4' class='rdv-type' />Signature PV<br />
<input type='radio' name='rdv-type' value='5' class='rdv-type' />Con step<br />
<input type='radio' name='rdv-type' value='3' class='rdv-type' />Land analysis<br />";
我沒有得到什麼,我我做錯了。我在第一個<br />
附近收到警告。
我查了其他帖子,但我真的不明白它爲什麼這樣做。
您是否嘗試刪除部分字符串以確定哪個部分導致錯誤? –
可能的重複[如何在JavaScript中的多行代碼中分割字符串?](http://stackoverflow.com/questions/508269/how-do-i-break-a-string-across-more -than-one-line-of-code-in-javascript) – Quentin
@Quentin如果你不知道這是一個有問題的斷字符串,只有錯誤信息,你將永遠無法得到這個問題。 – Christoph