Jinfang's Personal Page

如果有一天你突然想起了我

用户工具

站点工具


blog:2024:10:24

JavaScript给单个HTML页面添加密码

<script type=“text/javascript”>
var password = prompt(“Please enter the password to access this page:”);
if (password !== “your_password_here”) {
document.body.innerHTML = “Access denied!”;
}
</script>

评论

blog/2024/10/24.txt · 最后更改: 2025/01/04 04:35 由 jinfang