permaculture playing cards*
The moose likes HTML, CSS and JavaScript and the fly likes System.out.println equivalent? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "System.out.println equivalent?" Watch "System.out.println equivalent?" New topic
Author

System.out.println equivalent?

Herbert Kornfeld
Ranch Hand

Joined: Apr 16, 2003
Posts: 32
How can you do what is an equivalent of System.out.println in Javascript in order to debug?
Many Thanks
James Swan
Ranch Hand

Joined: Jun 26, 2001
Posts: 403
alert("my debug text");
sunitha reghu
Ranch Hand

Joined: Dec 12, 2002
Posts: 937
use alert(" system testing");
Paul McKenna
Ugly Redneck
Ranch Hand

Joined: Jul 08, 2000
Posts: 1006
to write it on the page you would use
document.write("Your Text");


Commentary From the Sidelines of history
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61105
    
  66


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


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: System.out.println equivalent?