Link to home
Start Free TrialLog in
Avatar of maqskywalker
maqskywalker

asked on

close window in firefox

On my html page I have a link like this:

<a href="javascript:window.close()">close</a>

If I click on it I want it to close the browser window.

The above code works on Chrome, IE 11 and IE Edge but does not work with Firefox.

What's the proper syntax so it works on all 4 of these browsers?

Or would if be better to use jquery?
ASKER CERTIFIED SOLUTION
Avatar of Leonidas Dosas
Leonidas Dosas
Flag of Greece image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of maqskywalker
maqskywalker

ASKER

thanks