Page 1 of 1

javascript alert help

Posted: Sun Feb 11, 2007 10:24 am
by danrah
when i use this character:

Code: Select all

& #1587; (i placed a space between ampersand and # intentionally to be posted  correctly here)
in a webpage, it shows the equivalent character(in this case س)
but when i use it like this:

Code: Select all

alert("& #1587;")
it shows "& #1587;" and not س.
how can i make alert() to behave properly?

Posted: Sun Feb 11, 2007 10:58 am
by Buddha443556
Check out the fromCharCode()Javascript function.