如何在按钮上单击关闭我的浏览器
问题描述:
亲爱的朋友们,
你能帮我解决一下如何在点击按钮时关闭我当前打开的浏览器。
i试过下面的java脚本功能但不起作用。
函数close_window(){
if(确认(关闭窗口?)){ br />
关闭();
}
}
关注
Dear Friends,
could you please help me how can close my current open browser on button click.
i have tried below java script function but it is not working.
function close_window() {
if (confirm("Close Window?")) {
close();
}
}
Regards
答
使用window.close()而不是close()函数。
use window.close() instead of close() function .