lundi 30 mars 2015

JavaScript: Single quote ' causes error


Vote count:

0




I have a string with a ' inside it:



<a href="#" onclick="if (confirm('... &#039; ...')) { document.exampleFormName.submit(); }">example link text</a>


' = '


Unfortunately this does not seem to work. Firebug says "SyntaxError: missing ) after argument list" and you can see that the ' has already been replaced by '.


What can I do to avoid this problem?



asked 11 secs ago







JavaScript: Single quote ' causes error

Aucun commentaire:

Enregistrer un commentaire