javascript fontWeight property
Translation results:
英 [fɔnt weit] US [fɑnt wet]
[理][WIN]font grayscale
javascript fontWeight propertysyntax
Function:Set the thickness of characters.
Syntax: Object.style.fontWeight=value
javascript fontWeight propertyexample
<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>
Run instance »
Click the "Run instance" button to view the online instance