<!DOCTYPE html> <html> <body> <h1>Document 对象</h1> <h2>activeElement 属性</h2> <p>与本文档相关的 Cookie:</p> <p id="demo"></p> <script> let allCookies = document.cookie; document.getElementById("demo").innerHTML = allCookies; </script> </body> </html>