Console Messages

[Total: 0    Average: 0/5]

This shows how to open up a “Console” window and send messages to it.

Head Code:

<script type="text/javascript">
var _console=null
var n=0
function debug(msg) {
  if ((_console==null) || (_console.closed)) {"","console","width=600,height=300,resizable")"text/plain")
function clearCount() {
  if (!_console.closed) _console.document.write("--------- RESET COUNTER ---------n")
function clearConsole() {
  _console.document.writeln(" ")

Body Code:

  <input type="button" value="Push Me" onClick="debug('You have pushed me:t'+ ++n + ' times.')">
  <input type="button" value="Clear Count" onClick="clearCount()">
  <input type="button" value="Clear Console" onClick="clearConsole()">

Times Viewed: 0

Leave a Reply

Your email address will not be published. Required fields are marked *