1

I can't get the bit of JavaScript code. Was watching a tutorial on JavaScript so I tested it my self. I went to read up a bit and some sources said it did not work in Chrome so I tested with Firefox. However, it still did not work on Firefox. What went wrong?

    <body onUnload="alert('Good Bye!');"></body>

UPDATE: By the way, the person in the tutorial used

    <body onUnload="alert('Good bye');"></body>

and it worked for him. He was using a older version of Chrome.

user3744056
  • 77
  • 1
  • 8

1 Answers1

1

Try OnBeforeUnload, unless you're targeting older browsers.

N-ate
  • 6,051
  • 2
  • 40
  • 48
  • You'll have to find someone to do some testing for you. I only develop for the latest versions of Ch, FF, OP, and SF. IE I sometimes support as far back as 8. – N-ate Jul 04 '14 at 03:56