SyntaxFix
Write A Post
Hire A Developer
Questions
Use the code below. It works every time.
<button onclick="self.close()">Close</button>
It works every time in Chrome and also works on Firefox.