You can close the current window programmatically using jQuery by calling the window.close() method within a click event handler or some other trigger.
CODE
<!DOCTYPE html> <html> <head> <title>target vs currenTtarget in javascript</title> <script src="http://code.jquery.com/jquery-1.9.1.js" type="text/javascript"></script> <script type="text/javascript"> $(function () { $('.btnClose').click(function () { window.close(); }); }); </script> </head> <body> <button class="btnClose">Close</button> </body> </html>
DISPLAY
No comments :
Please Give Your Feedback