0
I thought in JavaScript we used "console.log" to display codes
4 Réponses
+ 1
document.write() is a way to do, but even better practice would be to use the dom api to update its content rather than "streaming" raw content to the document (wich once "closed" will be implicitly opened to a completly new document on the first document.write() occuring).
Anyway, it's an quick and easy way to do basics output quite as with console.log(), but in more convenient way and sooooo much less intrusive than alert() ;)
0
Ohh. Tnx
0
As swim says, but if you use document.write to show the data insert from user, you must pay attention to XSS vulberabilty.