Cause if it does not work it may happen that you JS is disable in your webbrowser!Have your tried using a
as a button and apply the onclick event on it?An easier check for Javascript enables is just adding an alert() somewhere.Certainly we wouldn’t want to test with an onclick div and then accidentally leave it there, as div’s don’t have the proper roles, focusability or default behaviour we need for buttons.