Hosting Solutions
mobile_logo Table of Contents

Toggle Password Security Form Input Characters Tutorial

Learn to build a log in password security mode toggle function using simple Javascript that affects your HTML password type input field. Allow the user to change back and forth to any mode they like best for entering their passwords. <script> function togglePassword() { var upass = document.getElementById('upass'); var toggleBtn = document.getElementById('toggleBtn'); if(upass.type == "password"){ upass.type = "text"; toggleBtn.value = "Hide Password Characters"; } else { upass.type = "password"; toggleBtn.value = "Show Password Characters"; } } </script> Password: <input id="upass" type="password" name="userpass"> <input id="toggleBtn" type="button" onclick="togglePassword()" value="Show Password Characters">

JavaScript Videos

Form Programming

Contact Form Web Application Tutorial Ajax HTML5 PHPCheckbox Toggle Tutorial Select Deselect All ElementsIn Place Editing CMS Development HTML JavaScript TutorialCustom Progress Bar Meter Development For File Upload FormsMultiphase Form Programming Tutorial Multi StepRestrict Text Input Characters HTML JavaScript TutorialMonthly Payment Loan Calculator Form Programming TutorialDynamic Select Year List Script HTML Form ElementsTip Calculator Application Form Programming Tutorialtextarea Form Field Character Counting and LimitingBuilding a WYSIWYG Rich Text Editor Textarea Replacement Part 1Building a WYSIWYG Rich Text Editor Textarea Replacement Part 2Div contenteditable Click Select All Text execCommand selectAllToggle Password Security Form Input Characters TutorialTrap User Check for Unsaved Written Work TutorialReal Time Text Input or Textarea Filter TutorialForm Select Change Dynamic List Option Elements Tutorial