IntelliJ Java IDE
The moose likes HTML, CSS and JavaScript and the fly likes Inserting special character in java-script file Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Reply Bookmark "Inserting special character in java-script file" Watch "Inserting special character in java-script file" New topic
Author

Inserting special character in java-script file

pravin rasal
Ranch Hand

Joined: Jul 27, 2011
Posts: 50
I want to insert "mu" character after "Output in <here i want to insert mu character> " in following JavaScript line



how can I do that
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15003
Would using &#181; work?

Eric
pravin rasal
Ranch Hand

Joined: Jul 27, 2011
Posts: 50
thanks eric, i tried this won't work it gives me following error

cannot find method text()..........



Bear Bibeault
Author and opinionated walrus
Marshal

Joined: Jan 10, 2002
Posts: 50693

Check your syntax. Simply adding characters to a string literal will not cause errors to start happening.


[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
pravin rasal
Ranch Hand

Joined: Jul 27, 2011
Posts: 50
Bear Bibeault wrote:Check your syntax. Simply adding characters to a string literal will not cause errors to start happening.


I added µto :-



and it gives me output like : Output in µ

this give in forum correct mu symbol but when i tried in my js file it print as it is....

 
IntelliJ Java IDE
 
subject: Inserting special character in java-script file
 
Threads others viewed
How to distinguish the character encoding the MySql is using and the System is using?
life
life
on popular demand... quiz of the day
JDiscuss:while loop question
WebSphere development made easy
without the weight of IBM tools
http://www.myeclipseide.com