Hi all.
Have literally just begin to look at JavaScript and am just past the "Hello World" stage and have encountered a problem.
I have the code:
<html>
<head>Test</head>
<body>
<script language="JavaScript">
document.write("No line after this")
document.writeln("A line after this")
document.write("No line after this")
</script>
</body>
</html>
When I browse the html file I get the output:
No line after thisA line after thisNo line after this
without the line break I expected from the .writeln method.
Can someone please tell me what I'm doing wrong here.
Thanks in advance.
Russell.
Have literally just begin to look at JavaScript and am just past the "Hello World" stage and have encountered a problem.
I have the code:
<html>
<head>Test</head>
<body>
<script language="JavaScript">
document.write("No line after this")
document.writeln("A line after this")
document.write("No line after this")
</script>
</body>
</html>
When I browse the html file I get the output:
No line after thisA line after thisNo line after this
without the line break I expected from the .writeln method.
Can someone please tell me what I'm doing wrong here.
Thanks in advance.
Russell.
Comment