Show textbox on radio button check |
Show textbox on radio button check |
DeadSayWhat |
Mar 7 2023, 01:13 AM
Post
#1
|
Newbie Group: Members Posts: 13 Joined: 23-January 23 Member No.: 28,764 |
Hi, for an assignment I have a username and password input textbox appear when a radio button is checked and can't figure out how.
Any help would be greatly appreciated. Currently I have 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;} |
CharlesEF |
Mar 7 2023, 02:48 AM
Post
#2
|
Programming Fanatic Group: Members Posts: 1,981 Joined: 27-April 13 From: Edinburg, Texas Member No.: 19,088 |
Where's the HTML for the radio button?
|
Lo-Fi Version | Time is now: 12th May 2024 - 09:43 AM |