[ Leksykon ] [ JavaScript ] [ DOM ] [ document ]
document.write()
[_] [A] [B] [C] [D] [E] [F] [G] [H] [I] [J] [K] [L] [M] [N] [O] [P] [Q] [R] [S] [T] [U] [V] [W] [X] [Y] [Z]
document.write(exp1, exp2, ..., expN)
function myDom(tekst1, tekst2) {
document.write("Witaj, " + tekst1 + ".");
document.write("Dom jest " + tekst2 + ".");
};
myDom("Adam", "mały");
function myDom() {
document.write("Witaj!");
};
myDom();
<body>
<script type="text/javascript">
document.write("Witaj");
document.write("<br>");
</script>
</body>
Opis:
Metoda bezpośrednio zamieszcza tekst w dokumencie html
Zobacz też:
document.open() -
document.close() -
document.writeln() - Metoda bezpośrednio zamieszcza tekst w dokumencie html, dodatkowo daje znak nowej linii.
Linki: