haxe/api/haxe_js_node/test/Otro.html

83 lines
2.2 KiB
HTML
Raw Normal View History

2025-11-24 04:35:04 +08:00
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<style>
.form-container {
display: none;
margin-top: 10px;
}
.form-container.active {
display: table-caption;
}
<div class="button
</style>
<div class="buttons-container">
<button class="toggle-button">Button One</button>
<div class="form-container">
<form>
<input type="text" placeholder="Enter your Name">
<input type="text" placeholder="Enter your Marks">
<button type="submit">Submit</button>
</form>
</div>
</div>
<div class="buttons-container">
<button class="toggle-button">Button Two</button>
<div class="form-container">
<form>
<input type="text" placeholder="Enter your Name">
<input type="text" placeholder="Enter your Marks">
<button type="submit">Submit</button>
<form>
<input type="text" placeholder="Enter your Name">
<input type="text" placeholder="Enter your Marks">
<button type="submit">Submit</button>
</form>
<div class="form-container"></div>
</form>
<form>
<input type="text" placeholder="Enter your Name">
<input type="text" placeholder="Enter your Marks">
<button type="submit">Submit</button>
</form>
<div class="form-container">
<form>
<input type="text" placeholder="Enter your Name">
<input type="text" placeholder="Enter your Marks">
<button type="submit">Submit</button>
</form>
<div class="form-container">
<form>
<input type="text" placeholder="Enter your Name">
<input type="text" placeholder="Enter your Marks">
<button type="submit">Submit</button>
</form>
</div>
</div>
</div>
<button class="toggle-button">Button Two</button>
</div>
<script>
const buttons = document.querySelectorAll('.toggle-button');
buttons.forEach((button) => {
button.addEventListener('click', () => {
const formContainer = button.nextElementSibling;
formContainer.classList.toggle('active');
});
});
</script>
</body>
</html>