Tuesday, 2 September 2014

Closing Current tab using javascript

<!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>
view raw gistfile1.js hosted with ❤ by GitHub