I am using the following code.
HTML Code :
×
Javascript:
alert($(\".
× stands for × in html.
Use &times to get ×
I suspect you did not know that there are different & escapes in HTML. The W3C you can see the codes. × means × in HTML code. Use &times instead.
You need to escape the ampersand:
<div class="test">&times</div>
× means a multiplication sign. (Technically it should be × but lenient browsers let you omit the ;.)
Use the × code instead of ×
Because JSF don't understand the × code.
Use: × with ;
This link provides some additional information about the topic.
You need to escape:
<div class="test">&times</div>
And then read the value using text() to get the unescaped value:
alert($(".test").text()); // outputs: ×