+ 2

Javascript

what is the difference between... document.write, console.log and window.print...am confused.

20th Dec 2016, 1:25 PM
Murei K Vincent
Murei K Vincent - avatar
3 Antworten
+ 6
document.write writes in the html document (visible to the user) while console.log writes in the consoles (can be seen only by opening the console).
20th Dec 2016, 1:28 PM
Valen.H. ~
Valen.H. ~ - avatar
+ 4
window.print() prints something as functional code (with this you can rewrite the whole html page)
20th Dec 2016, 1:50 PM
Valen.H. ~
Valen.H. ~ - avatar
+ 1
thank you Valentin, I came across this, while learning in w3resource.. function_print_current_page { window.print(); }
20th Dec 2016, 1:44 PM
Murei K Vincent
Murei K Vincent - avatar