0

I am using jQuery to change the value of a button. The button contains arrow quotes (« and »). When I type the them in the javascript file it shows the character codes, not the characters themselves.

How do I get these arrow quotes to display properly within javascript?

2
  • 3
    I don't really understand. Do you mean you see « and » when you type those in, or something else? Commented Apr 6, 2011 at 15:59
  • Please show the code you're using that isn't working. Commented Apr 6, 2011 at 16:13

2 Answers 2

1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head><title></title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script type="text/javascript"><!--
jQuery(function($){
    $("input:button").val("«Done» and <Done>");
});
//--></script>
</head>
<body>

<p><input type="button" value="Please wait..."></p>

</body>
</html>

(If I wanted to display their codes, I'd have to think on how to do it.)

Sign up to request clarification or add additional context in comments.

Comments

0

How are you setting it? This works for me

<button id="test"></button>

$('#test').html('&#171');

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.