1. Tecnologia Web para desenvolvedores
  2. APIs da Web
  3. Document
  4. Document.writeln()

Esta página foi traduzida do inglês pela comunidade. Saiba mais e junte-se à comunidade MDN Web Docs.

View in English Always switch to English

Document.writeln()

Grava uma seqüência de texto, seguido por um caractere de nova linha a um documento.

Sintaxes

document.writeln(line);

Parâmetros

  • lineé uma string contendo uma linha de texto.

Exemplo

document.writeln("<p>enter password:</p>");

Notas

document.writeln é o mesmo que document.write mas acrescenta uma nova linha.

Nota: document.writeln (like document.write) does not work in XHTML documents (you'll get a "Operation is not supported" (NS_ERROR_DOM_NOT_SUPPORTED_ERR) error on the error console). This is the case if opening a local file with a .xhtml file extension or for any document served with an application/xhtml+xml MIME type. More information is available in the W3C XHTML FAQ.

Especificação

writeln

Help improve MDN

Learn how to contribute

This page was last modified on by MDN contributors.

AltStyle によって変換されたページ (->オリジナル) /