File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

System.out.println equivalent?

 
Herbert Kornfeld
Ranch Hand
Posts: 32
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How can you do what is an equivalent of System.out.println in Javascript in order to debug?
Many Thanks
 
James Swan
Ranch Hand
Posts: 403
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
alert("my debug text");
 
sunitha reghu
Ranch Hand
Posts: 937
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
use alert(" system testing");
 
Paul McKenna
Ugly Redneck
Ranch Hand
Posts: 1006
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
to write it on the page you would use
document.write("Your Text");
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64173
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

to write it on the page you would use document.write("Your Text");

This technique is only useful in on-page script that executes while the page is loading. After the page is laoded, this will not do what you want!
bear
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic