JSFiddle - React, Tailwind, and code Playground
by funato
HTML
<p class="btn"><input id="btnClose" type="button" value="閉じる" /></p>
JavaScript
$('#btnClose').on('click',function(){
if(confirm('閉じてよろしいですか?')){
window.close();
}else{
alert('閉じるのを中止しました');
}
});