+ 1
does document.write() doesnot support escape character in it??
document.write("hello \n world"); doesnot shows in two different lines..why?
3 odpowiedzi
+ 1
document.write("Hello<br>World!");
+ 1
@Name document.write outputs to HTML document. How's console.log going to do that?
I'm aware of the fact that experts don't want us to use 'document.write' alltogether, but 'console.log' isn't an alternative.
- 2
u need to put document.write("hi there \n hi") not document.write("hi there /n hi")
the /n should be \n. I hope i helped you