编辑下面的代码:【加编码】
<html> <body onload="checkCookies()"> <script> function checkCookies() { if (navigator.cookieEnabled==true) { alert("Cookies are enabled") } else { alert("Cookies are not enabled") } } </script> <p>An alert box should tell you if your browser has enabled cookies or not.</p> </body></html>
结果: 【此窗口】 帮助?
Try it Yourself - © 自强学堂