Hallo, für eine Aufgabe habe ich einen Benutzernamen und ein Passwort Eingabe-Textfeld erscheinen, wenn ein Radio-Button aktiviert ist und kann nicht herausfinden, wie.
Jede Hilfe würde sehr geschätzt werden.
Derzeit habe ich
html
<div class="usernamebox"><label for="username">Username: </label><input type="text" id="username" name="username" placeholder="username"></div>
<div class="passwordbox"><label for="password">Password: </label><input type="password" id="password" name="password" placeholder="password"></div>
Java
<script>function display() {if(document.getElementById("signup").checked) {
document.getElementById("username").style.display = "inline";
document.getElementById("password").style.display = "inline";}}</script>
css
.usernamebox{display: none;}
.passwordbox{display: none;}