JavaScript String fontcolor() methode

Definitie en gebruik

De String fontcolor() methode is in JavaScript verouderd.

Voorkom het gebruik ervan.

Het kan op elk moment stoppen met draaien in uw browser.

fontcolor() De methode retourneert een string die ingesloten is tussen <font>-tags:

<font color="colorvalue">string</font>

HTML5 does not support the <font> tag.

Example

let text = "Hello World!";
let result = text.fontcolor("green");

Try it yourself

Syntax

string.fontcolor("color)

Parameter

Parameter Description
color Required. RGB or hexadecimal color value.

Return value

String embedded in the <font> tag.