Reputation: 1269
Is it possible to display characters like <
, >
, '
, etc in Javascript's pop up alert()
or confirm()
?
<
is automatically changed to <
etc.
The same still occurs if I change the symbols to their unicode like <
to \u003c
etc.
Upvotes: 2
Views: 2289
Reputation: 610
You could directly use alert("<") to display <. If not:
Upvotes: 1
Reputation: 38147
Maybe its a browser problem / your code (ie how you are setting the string to be displayed) because it works fine for me - what browser are you using ?
http://jsfiddle.net/manseuk/uyMhJ/1/
Upvotes: 1