Deprecated
This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the compatibility table at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.
El mètode blink()
crea un elment HTML <blink>
que fa mostrar una cadena de forma intermitent.
Advertència: El text que es mostra de forma intermitent és mal vist per varis estàndards d'accessibilitat. L'element <blink>
no és estàndard i és obsolet!
Sintaxi
str.blink()
Descripció
El mètode blink()
incrusta una cadena dins l'etiqueta <blink>
: "<blink>cad</blink>"
.
Exemples
Utilitzar blink()
L'exemple següent utilitza mètodes string per canviar el format d'una cadena:
var worldString = 'Hello, world'; console.log(worldString.blink()); // <blink>Hello, world</blink> console.log(worldString.bold()); // <b>Hello, world</b> console.log(worldString.italics()); // <i>Hello, world</i> console.log(worldString.strike()); // <strike>Hello, world</strike>
Especificacions
Especificació | Estat | Comentaris |
---|---|---|
ECMAScript 2015 (6th Edition, ECMA-262) The definition of 'String.prototype.blink' in that specification. |
Standard | Definició inicial. Implementat en JavaScript 1.0. Definit en l'Annex B (normative) per característiques addiccionals d'ECMAScrip per Navegadors Web. |
Compatibilitat amb navegadors
Característica | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari |
---|---|---|---|---|---|
Suport bàsic | (Yes) | 1.0 (1.7 or earlier) | (Yes) | (Yes) | (Yes) |
Característica | Android | Chrome per Android | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|---|
Suport bàsic | (Yes) | (Yes) | 1.0 (1.0) | (Yes) | (Yes) | (Yes) |