<!DOCTYPE html>
<html>
<body>
<p>Click the button to get the cookies associated with the current document.</p>
<button onclick="myFunction()">Try it</button>
<p id="demo"></p>
<script>
function myFunction() {
var x = document.cookie;
document.getElementById("demo").innerHTML = "Cookies associated with this document: " + x;
}
</script>
</body>
</html>