Voici un code HTML qui permettra de créer des bouton pour des caractères spéciaux. C'est pas tout à fait fini....
- Code: Tout sélectionner
Si vous n'avez pas de clavier français, vous pouvez utiliser ces boutons pour insérer des caractères accentués:
<br>
<input title="insert â" onclick="add_national('â')" value="â" type="button">
<input title="insérer á" onclick="add_national('á')" value="á" type="button">
<input title="insérer à " onclick="add_national('à ')" value="à " type="button">
<input title="insérer ç" onclick="add_national('ç')" value="ç" type="button">
<input title="insérer ê" onclick="add_national('ê')" value="ê" type="button">
<input title="insérer é" onclick="add_national('é')" value="é" type="button">
<input title="insérer è" onclick="add_national('è')" value="è" type="button">
<input title="insérer ë" onclick="add_national('ë')" value="ë" type="button">
<input title="insérer î" onclick="add_national('î')" value="î" type="button">
<input title="insérer Ã" onclick="add_national('Ã')" value="Ã" type="button">
<input title="insérer ì" onclick="add_national('ì')" value="ì" type="button">
<input title="insérer ï" onclick="add_national('ï')" value="ï" type="button">
<input title="insérer ô" onclick="add_national('ô')" value="ô" type="button">
<input title="insérer ó" onclick="add_national('ó')" value="ó" type="button">
<input title="insérer ò" onclick="add_national('ò')" value="ò" type="button">
<input title="insérer œ" onclick="add_national('œ')" value="œ" type="button">
<input title="insérer û" onclick="add_national('û')" value="û" type="button">
<input title="insérer ú" onclick="add_national('ú')" value="ú" type="button">
<input title="insérer ù" onclick="add_national('ù')" value="ù" type="button">
<input title="insérer æ" onclick="add_national('æ')" value="æ" type="button">
<br>
<br>
<script language="JavaScript">
var message='<INPUT TITLE="insérer â" onclick="add_national(\'â\')" type="button" value="â">
<INPUT TITLE="insérer á" onclick="add_national(\'á\')" type="button" value="á">
<INPUT TITLE="insérer à " onclick="add_national(\'à \')" type="button" value="à ">
<INPUT TITLE="insérer ç" onclick="add_national(\'ç\')" type="button" value="ç">
<INPUT TITLE="insérer ê" onclick="add_national(\'ê\')" type="button" value="ê">
<INPUT TITLE="insérer é" onclick="add_national(\'é\')" type="button" value="é">
<INPUT TITLE="insérer è" onclick="add_national(\'è\')" type="button" value="è">
<INPUT TITLE="insérer ë" onclick="add_national(\'ë\')" type="button" value="ë">
<INPUT TITLE="insérer î" onclick="add_national(\'î\')" type="button" value="î">
<INPUT TITLE="insérer Ã" onclick="add_national(\'Ã\')" type="button" value="Ã">
<INPUT TITLE="insérer ì" onclick="add_national(\'ì\')" type="button" value="ì">
<INPUT TITLE="insérer ï" onclick="add_national(\'ï\')" type="button" value="ï">
<INPUT TITLE="insérer ô" onclick="add_national(\'ô\')" type="button" value="ô">
<INPUT TITLE="insérer ó" onclick="add_national(\'ó\')" type="button" value="ó">
<INPUT TITLE="insérer ò" onclick="add_national(\'ò\')" type="button" value="ò">
<INPUT TITLE="insérer œ" onclick="add_national(\'œ\')" type="button" value="œ">
<INPUT TITLE="insérer û" onclick="add_national(\'û\')" type="button" value="û">
<INPUT TITLE="insérer ú" onclick="add_national(\'ú\')" type="button" value="ú">
<INPUT TITLE="insérer ù" onclick="add_national(\'ù\')" type="button" value="ù">
<INPUT TITLE="insérer æ" onclick="add_national(\'æ\')" type="button" value="æ">'
var backgroundcolor="#FFFF8A"
var displaymode=1
var displayduration=0
var flashmode=0
var flashtocolor="lightyellow"
var ie=document.all
var ieNOTopera=document.all&&navigator.userAgent.indexOf("Opera")==-1
function regenerate(){
window.location.reload()
}
function regenerate2(){
if (document.layers)
setTimeout("window.onresize=regenerate",400)
}
var which=0
function flash(){
if (which==0){
if (document.layers)
topmsg_obj.bgColor=flashtocolor
else
topmsg_obj.style.backgroundColor=flashtocolor
which=1
}
else{
if (document.layers)
topmsg_obj.bgColor=backgroundcolor
else
topmsg_obj.style.backgroundColor=backgroundcolor
which=0
}
}
if (ie||document.getElementById)
document.write('<div id="topmsg" style="position:absolute;visibility:hidden">'+message+'</div>')
var topmsg_obj=ie? document.all.topmsg : document.getElementById? document.getElementById("topmsg") : document.topmsg
function positionit(){
var dsocleft=ie? document.body.scrollLeft : pageXOffset
var dsoctop=ie? document.body.scrollTop : pageYOffset
var window_width=ieNOTopera? document.body.clientWidth : window.innerWidth-20
var window_height=ieNOTopera? document.body.clientHeight : window.innerHeight
if (ie||document.getElementById){
topmsg_obj.style.left=parseInt(dsocleft)+window_width/2-topmsg_obj.offsetWidth/2
topmsg_obj.style.top=parseInt(dsoctop)+parseInt(window_height)-topmsg_obj.offsetHeight-4
}
else if (document.layers){
topmsg_obj.left=dsocleft+window_width/2-topmsg_obj.document.width/2
topmsg_obj.top=dsoctop+window_height-topmsg_obj.document.height-5
}
}
function setmessage(){
if (displaymode==2&&(!display_msg_or_not()))
return
if (document.layers){
topmsg_obj=new Layer(window.innerWidth)
topmsg_obj.bgColor=backgroundcolor
regenerate2()
topmsg_obj.document.write(message)
topmsg_obj.document.close()
positionit()
topmsg_obj.visibility="show"
if (displayduration!=0)
setTimeout("topmsg_obj.visibility='hide'",displayduration)
}
else{
positionit()
topmsg_obj.style.backgroundColor=backgroundcolor
topmsg_obj.style.visibility="visible"
if (displayduration!=0)
setTimeout("topmsg_obj.style.visibility='hidden'",displayduration)
}
setInterval("positionit()",100)
if (flashmode==1)
setInterval("flash()",1000)
}
function get_cookie(Name) {
var search = Name + "="
var returnvalue = ""
if (document.cookie.length > 0) {
offset = document.cookie.indexOf(search)
if (offset != -1) {
offset += search.length
end = document.cookie.indexOf(";", offset)
if (end == -1)
end = document.cookie.length;
returnvalue=unescape(document.cookie.substring(offset, end))
}
}
return returnvalue;
}
function display_msg_or_not(){
if (get_cookie("displaymsg")==""){
document.cookie="displaymsg=yes"
return true
}
else
return false
}
if (document.layers||ie||document.getElementById)
window.onload=setmessage
</script>
</font>
</b>
</b>
</b>
<div id="topmsg" style="position: absolute; visibility: visible; left: 317px; top: 1154px; background-color: rgb(255, 255, 138);">
<b>
<b>
<b>
<font size="2">
<input title="insérer â" onclick="add_national('â')" value="â" type="button">
<input title="insérer á" onclick="add_national('á')" value="á" type="button">
<input title="insérer à " onclick="add_national('à ')" value="à " type="button">
<input title="insérer ç" onclick="add_national('ç')" value="ç" type="button">
<input title="insérer ê" onclick="add_national('ê')" value="ê" type="button">
<input title="insérer é" onclick="add_national('é')" value="é" type="button">
<input title="insérer è" onclick="add_national('è')" value="è" type="button">
<input title="insérer ë" onclick="add_national('ë')" value="ë" type="button">
<input title="insérer î" onclick="add_national('î')" value="î" type="button">
<input title="insérer Ã" onclick="add_national('Ã')" value="Ã" type="button">
<input title="insérer ì" onclick="add_national('ì')" value="ì" type="button">
<input title="insérer ï" onclick="add_national('ï')" value="ï" type="button">
<input title="insérer ô" onclick="add_national('ô')" value="ô" type="button">
<input title="insérer ó" onclick="add_national('ó')" value="ó" type="button">
<input title="insérer ò" onclick="add_national('ò')" value="ò" type="button">
<input title="insérer œ" onclick="add_national('œ')" value="œ" type="button">
<input title="insérer û" onclick="add_national('û')" value="û" type="button">
<input title="insérer ú" onclick="add_national('ú')" value="ú" type="button">
<input title="insérer ù" onclick="add_national('ù')" value="ù" type="button">
<input title="insérer æ" onclick="add_national('æ')" value="æ" type="button">
</font>
</b>
</b>
</b>
</div>
<b>
<b>
<b>
<font size="2">
J'ai trouvé ça sur internet, mais je sais pas si il est très fonctionnel :
- Code: Tout sélectionner
Caractères spéciaux :
<a href="javascript:accent_new('Ã ')" class="specChar">Ã </a>
<a href="javascript:accent_new('â')" class="specChar">â</a>
<a href="javascript:accent_new('ç')" class="specChar">ç</a>
<a href="javascript:accent_new('é')" class="specChar">é</a>
<a href="javascript:accent_new('è')" class="specChar">è</a>
<a href="javascript:accent_new('ê')" class="specChar">ê</a>
<a href="javascript:accent_new('î')" class="specChar">î</a>
<a href="javascript:accent_new('ï')" class="specChar">ï</a>
<a href="javascript:accent_new('ñ')" class="specChar">ñ</a>
<a href="javascript:accent_new('ô')" class="specChar">ô</a>
<a href="javascript:accent_new('ù')" class="specChar">ù</a>
<a href="javascript:accent_new('ü')" class="specChar">ü</a>
<a href="javascript:accent_new('û')" class="specChar">û</a>
<a href="javascript:accent_new('ú')" class="specChar">ú</a>
Franchement, je sais pas lequel choisir, mais je vais tester l'un et l'autre et je vous dirai, mais si quelqu'un peut me dire à quoi correspondent ces trucs :








