Write to the Javascript console Tag(s): Varia
Modern browsers provides a console to see javascript debugging output.
To print to the console, use :
console.log('Hello from Real\'s HowTo!');
With IE, if the console is not active, an error occurs.
You can detect if the console exists, if not then you defined the console object with an empty log function.
if (!window.console) console = {log: function() {}};
mail_outline
Send comment, question or suggestion to howto@rgagnon.com
Send comment, question or suggestion to howto@rgagnon.com