Question: Have the below code in Javascript/HTML. I need help to store the local items in function (onSave), I was able to store username,email and number
Have the below code in Javascript/HTML.
I need help to store the local items in function (onSave), I was able to store username,email and number but need help to store the radioboxes, checkboxes, dropdown and comments as seen in HTML file.
Please help with completing the Javascript
JavaScript Document
function onSave () { // This function allows you to save the variable to the local storage
var user = document.getElementById("Username");
var email = document.getElementById ("Email") ;
var number = document.getElementById ("Number");
localStorage.setItem("Username", user.value);
localStorage.setItem("Email",email.value);
localStorage.setItem("Number",number.value);
---------------------------------------------------------------------------------------------
Contact us
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
