Answer the question
In order to leave comments, you need to log in
How to close the current browser tab using JS?
Hello! I ask for your help, because I am just a beginner in JS.
You want to close the current tab when you click on the button.
var close_btn = document.getElementById('close_btn');
close_btn.onclick = function(){
window.close();
}
doesn't work. How to be?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question