JS - Checkbox Example
How do I make an js - checkbox example?
What is a js - checkbox example? How do you make a js - checkbox example? This script and codes were developed by Colleen Van Lent on 26 August 2022, Friday.
JS - Checkbox Example - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>JS - Checkbox Example</title> <link rel="stylesheet" href="css/style.css">
</head>
<body>
</head>
<body> <form action="http://www.intro-webdesign.com" method = "GET"> <fieldset> <legend>Form Verification</legend> <label for ="fName">First Name:</label> <input type = "text" name = "fName" id = "fName" required><br/> <label for = "lName">Last Name:</label> <input type = "text" name = "lName" id = "lName" required><br/> <label for = "yesNick">Nickname?:</label> <input id="yesNick" name="yesNick" type="checkbox" value="yes" onchange= "nicknameFunction()"/> <br/> <div id = "nick"> <label for = "nickname">Nickname:</label> <input type = "text" name = "nickname" id = "nickname"><br/> </div> <input type = "submit" value = "Verify"/> </fieldset>
</form>
</body>
</html> <script src="js/index.js"></script>
</body>
</html>
JS - Checkbox Example - Script Codes CSS Codes
input{ border:1px solid black; } input:focus{ background-color: #E6E6E6; } #nick{ margin-left: 4%; display:none; width: 50%; }
JS - Checkbox Example - Script Codes JS Codes
function nicknameFunction(){ if (document.getElementById('yesNick').checked){ document.getElementById('nick').style.display="inline"; document.getElementById('nickname').setAttribute('required',true); } else{ document.getElementById('nickname').removeAttribute('required'); document.getElementById('nick').style.display="none"; } }
Developer | Colleen Van Lent |
Username | ColleenEMc |
Uploaded | August 26, 2022 |
Rating | 3.5 |
Size | 2,002 Kb |
Views | 34,408 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
JS Events - Change Style | 1,931 Kb |
JS - CurrentDate | 1,400 Kb |
Box Display | 1,795 Kb |
Index.html | 2,316 Kb |
JS Events - Modify The DOM | 0 Kb |
JS-Form With Cancel Button Page 2 | 1,882 Kb |
Code Together 3 No CSS - Classes | 1,796 Kb |
Code Together 2 - No CSS | 1,774 Kb |
JS - this second example | 1,990 Kb |
Code Together 1 - With CSS | 2,136 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
Responsive Pricing Table | Jeremycaris | 2,690 Kb |
Ghost Buttons with CSS3 | Mithicher | 2,509 Kb |
Border-radius animation | Yukulele | 2,480 Kb |
Velocity.js custom stagger | Tommiehansen | 4,805 Kb |
Disable JavaScript execution from console | Ludviglindblom | 2,534 Kb |
Pure CSS Animated Photo Stack | Depthdev | 2,486 Kb |
Segments mouse following | Nosir | 2,909 Kb |
JavaScript Animation | Rcmeisty | 4,581 Kb |
React Markdown Previewer | C0d0er | 3,190 Kb |
Bootstrap 4 Gridsystem Demo | Rivella50 | 1,535 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!