no save
Assistance
Achat
News

Forum | Logiciels/Pilotes
word : clic => apparition d'image dans texte
chalchalero, le sam. 24 mars 2007 à 11:15:19
je viens de tester une solution html/javascript
Il suffit d'enregistrer le document word en html (filtré ou non, mais pas mht) puis de modifier le html pour y inclure le code suivant juste après la balise </head>



</head>

<script language="JavaScript" type="text/JavaScript">
<!--

ratio=10;

function ajoute_onclick() {

var var_change_taille = new Function("bascule_taille(this)");
coef=1/ratio;
for(i = 0; i < document.images.length; ++i) {
image=document.images[i];
if (image.width>50) {
image.width=coef* image.width;
image.height=coef*image.height;
image.alt="miniature";
image.border=1;
image.onclick= var_change_taille;

}

}
}

function bascule_taille(obj){

largeur=this.width;
hauteur=this.heigth;

if (obj.alt=="miniature") {
coef=ratio ;
obj.border=1;
obj.alt="";
}
else {
coef=1/ratio ;
obj.alt="miniature";
}

obj.width=coef* obj.width;
obj.height=coef*obj.height;

}



//-->
</script>
</head>

<body onload="ajoute_onclick()"; lang=FR link=blue vlink=purple>


à l'ouverture de la page web les images sont en miniatures.
Des clics successifs sur une image la font passer de taille alternativement de taille réduite à taille normale.
Précédentgbousquet
mars 07
plubarj
avr. 08
Suivant
REPONSES
Gihef
févr. 06
gbousquet
mars 07
chalchalero
mars 07
plubarj
avr. 08
Version Web
Réalisé par RedShift
no save