一旦有人输入密码,我试图显示一个隐藏的 div。密码不是在查看数据库。现在可以是类似 testpass 的东西。到目前为止,这是我的编码。它可以是任何 java、javascript 或其他东西。我们使用 Coldfusion。我猜 javascript 会是最简单的,但我不确定。我需要添加什么才能进入 testpass 以显示隐藏的内容?安全无所谓。我只是希望用户在向他们显示隐藏的内容之前输入一些内容。
谢谢
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<meta charset="utf-8">
<title>Untitled Document</title>
<style>
.buttongrt {
background-color: #ffffff;
border: none;
color: black;
padding: 6px 10px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 10px;
margin: 4px 2px;
cursor: pointer;
}
</style>
</head>
<body>
<button onclick="hideform()" class="buttongrt">show form</button>
<div id="buttonfgc" style="display:none">
thing that it's hiding</div>
<br>thing that it's not hiding
<script type="text/javascript">
function hideform() {
var T = document.getElementById("buttonfgc"),
displayValue = "";
if (T.style.display == "")
displayValue = "none";
T.style.display = displayValue;
}
</script>
</body>
</html>