javascript alert help

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
danrah
Forum Newbie
Posts: 8
Joined: Sun Dec 03, 2006 7:13 am

javascript alert help

Post 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?
User avatar
Buddha443556
Forum Regular
Posts: 873
Joined: Fri Mar 19, 2004 1:51 pm

Post by Buddha443556 »

Check out the fromCharCode()Javascript function.
Post Reply