Edit This Code:
<!DOCTYPE html>
<html>
<body>

<p>Are cookies enabled in your browser?</p>

<button onclick="myFunction()">Try it</button>

<p id="demo"></p>

<script>
function myFunction() {
    document.getElementById("demo").innerHTML =
    "Cookies enabled is " + navigator.cookieEnabled;
}
</script>

</body>
</html>


Result:
Try it Yourself - © w3schools.com
Privacy Policy