changer la dimension du font

Le
Cartel
Hello, I wish to modify the dimension of the font within a given table; when
I hit a button, the font size increases by 1 point; another button decreases
it by 1 point, and a last button will reset it to the original size. Any
ideas?

Merci.

(Sorry, I don't speak french very well)
Vos réponses
Gagnez chaque mois un abonnement Premium avec GNT : Inscrivez-vous !
Trier par : date / pertinence
ASM
Le #3983

Hello, I wish to modify the dimension of the font within a given table; when
I hit a button, the font size increases by 1 point; another button decreases
it by 1 point, and a last button will reset it to the original size. Any
ideas?


must use css than fonts

<table><tr><td><p id="foo">blah</p></td></tr></table>
or
<table><tr><td><font size=3 id="foo">blah</font></td></tr></table>

<a href="#" onclick="document.getElementById('foo').style.fontSize='larger';
return false;">Larger</a>

<a href="#" onclick="document.getElementById('foo').style.fontSize='smaller';
return false;">Smaller</a>

<a href="#" onclick="document.getElementById('foo').style.fontSize='';
return false;">Normal</a>

<a href="#" onclick="with(document.getElementById('foo').style){
color = (color=='red')? 'black': 'red';}
return false;">Colored in red or black</a>


doesn't work with NC4.5 :-(

--
*******************************************************
Stéphane MORIAUX et son vieux Mac
*******************************************************

Publicité
Poster une réponse
Anonyme