1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
|
<style>
.bouton{
color:#0000ff;
font-size:24px;
cursor:pointer;}
.bouton:hover{
text-decoration:underline;}
.texte{
border:1px solid #333333;
background:#eeeeee;
padding:10px;
color:#333333;}
.texte:hover{
border:1px solid #000000;
background:#cccccc;
color:#000000;
</style>
<span class="bouton" id="bouton_texte" onclick="javascript:afficher_cacher('texte');">Afficher le texte</span>
<text transform="matrix(1 0 0 1 148.251 72.3003)"> <tspan id="texte" x="-5.6" y="0" class="texte">Lauderdale</tspan></text>
<text transform="matrix(1 0 0 1 226.5005 80.2905)"> <tspan id="texte" x="-4" y="0" class="texte">Limeston</tspan></text>
<text transform="matrix(1 0 0 1 279.4019 87.4546)"> <tspan id="texte" x="-5" y="0" class="texte">Madison</tspan></text>
<script type="text/javascript">
//<!--
afficher_cacher('texte');
//-->
</script>
<script type="text/javascript">
function afficher_cacher(id)
{
if(document.getElementById(id).style.visibility=="hidden")
{
document.getElementById(id).style.visibility="visible";
document.getElementById('bouton_'+id).innerHTML='Cacher le texte';
}
else
{
document.getElementById(id).style.visibility="hidden";
document.getElementById('bouton_'+id).innerHTML='Afficher le texte';
}
return true;
}
</script> |
Partager