Как мне сделать кнопку, которая закрывает браузер. Приведенный ниже код не работает для моего ASP. NET MVC приложения
<!DOCTYPE html>
<body>
<input type="submit" id="btnCloseScreen" name="btnCloseScreen" value="X" style="font-size:large; font-weight:bold; background-color:red; width:30px; border-color:#3f464c; height:30px" />
</body>
<script type="text/javascript">
$("#btnCloseScreen").click(function () {
if (document.exitFullscreen) {
document.exitFullscreen();
} else if (document.mozCancelFullScreen) {
document.mozCancelFullScreen();
} else if (document.webkitExitFullscreen) {
document.webkitExitFullscreen();
} else if (document.msExitFullscreen) {
document.msExitFullscreen();
}
});
</script>