# special characters in a javascript alert?



## andehlu (Jul 17, 2005)

Does anyone know how to put special characters in a javascript alert?

Im trying to make a french js alert....
alert("Veuillez inscrire votre pr&eacute;nom..")

thanks for the help.....


----------



## elander (Jul 17, 2005)

Use unicode, and precede the code with \u, like this:

'Veuillez inscrire votre pr'+\u00E9+'nom'

Use this to find the right codes:
http://www.unicode.org/charts/


----------



## subhash_reddy36 (Jul 30, 2009)

If you want to dispaly special characters of german in javascript alert or innerHtml or InnerText then fomat as below

For Example:

you want to display
 alert(''Bitte überprüfen Sie die Eingabe'');

instead of ü use \u00FC

alert('Bitte \u00FCberpr\u00FCfen Sie die Eingabe');

Use this to find the right codes for German Characters:
http://www.unicode.org/charts/PDF/U0080.pdf


----------

