propriété javascript fontWeight


  Résultats de traduction:

英 [fɔnt weit] 美 [fɑnt wet]

[calcul][WIN] police en niveaux de gris

propriété javascript fontWeightsyntaxe

Fonction : Définissez l'épaisseur des caractères.

Syntaxe : Object.style.fontWeight=value

propriété javascript fontWeightexemple

<html>
<head>
<script type="text/javascript">
function setFontWeight()
{
document.getElementById("p1").style.fontWeight="900";
}
</script>
</head>
<body>

<p id="p1">This is an example paragraph.</p>
<p>This is another example paragraph.</p>

<input type="button" onclick="setFontWeight()"
value="Display bold text" />

</body>
</html>

Exécuter l'instance »

Cliquez sur le bouton « Exécuter l'instance » pour afficher l'instance en ligne

Maison

vidéos

Questions et réponses