--- title: String.prototype.blink() slug: Web/JavaScript/Reference/Global_Objects/String/blink tags: - Deprecated - JavaScript - Method - Prototype - String translation_of: Web/JavaScript/Reference/Global_Objects/String/blink original_slug: Web/JavaScript/Referencje/Obiekty/String/blink ---
Powoduje, iż łańcuch będzie migotał tak, jakby był on wewnątrz znacznika {{HTMLElement("blink")}}.
Warning: Blinking text is frowned upon by several accessibility standards. The <blink>
element itself is non-standard and deprecated!
str.blink()
The blink()
method embeds a string in a <blink>
tag: "<blink>str</blink>"
.
blink()
Następujący przykład stosuje metodę string do zmiany formatowania łańcucha znaków:
var worldString="Witaj, Świecie"; console.log(worldString.blink()); // <blink>Witaj, Świecie</blink> console.log(worldString.bold()); // <bold>Witaj, Świecie</bold> console.log(worldString.italics()); // <i>Witaj, Świecie</i> console.log(worldString.strike()); // <s>Witaj, Świecie</s>