Document.writeln()

Écrit une chaine de caractères suivie d'un retour de ligne.

Syntaxe

js
document.writeln(ligne);

Paramètres

  • ligne est la chaine de caractère contenant le texte.

Exemple

js
document.writeln("<p>Entrez votre mot de passe :</p>");

Notes

document.writeln est identique à document.write, mais ajoute une nouvelle ligne.

Spécifications

Specification
HTML
# dom-document-writeln-dev

Compatibilité des navigateurs

Report problems with this compatibility data on GitHub
desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
writeln
Accepts TrustedHTML instances

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
Partial support
Partial support
No support
No support
User must explicitly enable this feature.
Has more compatibility info.