skip to Main Content

Want to be able to have a specific input text box be checked for a specific word! Vanilla JS – Html

<!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>Project Keypad</title> <link rel="stylesheet" href="css/style.css"> </head> <body class="light-mode"> <button onclick="myFunction()" id="toggle-button">☀️</button> <h2> Welcome to Project Keypad</h2> <form> <div id="login"> Enter Username: <input type="text" id="userName" placeholder="Enter username…

VIEW QUESTION

How could I make it so that the dark mode switch effects more then just the body, As well as making it change icons to a moon once toggled? – Html

function myFunction () { let element = document.body; element.classList.toggle("dark-mode"); } @import url('https://fonts.googleapis.com/css2?family=Roboto+Condensed:ital,wght@1,700&display=swap'); /*Used for Nav */ @import url('https://fonts.googleapis.com/css2?family=Sono:wght@300&display=swap'); /* used for body */ body { background-color: #5465FF; font-family: 'Sono', sans-serif; color: black; } img { width: 30%; height: auto; margin-top:…

VIEW QUESTION
Back To Top
Search