<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Form Visibility Example</title>
<script>
function toggleForm() {
var form = document.getElementById("myForm");
if (form.style.display === "none") {
form.style.display = "block";
} else {
form.style.display = "none";
}
}
</script>
</head>
<body>
<button onclick="toggleForm()">显示/隐藏表单</button>
<form id="myForm">
<input type="text" name="username" placeholder="用户名">
<input type="password" name="password" placeholder="密码">
<input type="submit" value="提交">
</form>
</body>
</html>
07-15
6217
