/gist:d7f5a5194e032f99b29e Secret
Created
September 2, 2014 20:36
Closing Current tab using javascript
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<title></title> | |
<script type="text/javascript"> | |
function CloseWindow() { | |
window.opener = self; | |
window.close(); | |
} | |
</script> | |
</head> | |
<body> | |
<a href='javascript:CloseWindow();'>Click here to Close</a> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment