<html lang="en">
<head>
<meta charset="UTF-8">
<title> JavaScript Window Navigator Detect Cookie </title>
</head>
<body>
<script>
function checkCookieEnabled() {
if(navigator.cookieEnabled) {
alert("Cookies are enabled in your browser.");
} else {
alert("Cookies are disabled in your browser.");
}
}
</script>
<button type="button" onclick="checkCookieEnabled();">Check If Cookies are Enabled</button>
</body>
</html>