Affichage des caractères Unicode

dimi3 Posted messages 278 Status Membre -  
dimi3 Posted messages 278 Status Membre -
Bonjour,

I would like the character ĉ (c with a circumflex accent) to display in the input "entree" when clicking the button [ĉ]. But only the letter "c" shows up without the accent.

Here is the code:

-----------------------------------------------------
<html>
<head>
<script language="javascript">
function ccirc()
{
recup=document.f.entree.value;
carac = "ĉ";
document.f.entree.value = recup + carac;
}

</script>
</head>
<body>

<form name="f">
<input type="button" name ="c" value="ĉ" onclick="ccirc()"><br>
<input name="entree" type="text">
</form>

</body>

----------------------------------------

I must be doing something wrong. Thank you for your help.
Configuration: Windows 7 / Opera 9.80

2 réponses

Defouille Posted messages 404 Status Membre 54
 
Hello,
If you want to display it in HTML, try encoding it in HTML,
&ccirc; I suppose.
--
There are only 10 types of people, those who understand binary and the others...
0