Question: HTml local and session storage stop working keep in mind there's like 15 questions in total. I think it's the save button function html Next,
HTml local and session storage stop working
keep in mind there's like 15 questions in total. I think it's the save button function
html
Next, add a correct answer FIRST and then the incorrect answers for your question.
function PreviewImage1() {
var oFReader = new FileReader();
oFReader.readAsDataURL(document.getElementById("uploadImage1").files[0]);
oFReader.onload = function(oFREvent) {
document.getElementById("uploadPreview1").src = oFREvent.target.result;
sessionStorage.setItem("image", oFREvent.target.result);
localStorage.setItem("image", oFREvent.target.result);
};
};
Submit
javascript
function save() {
//question1
var question1 = document.getElementById("question1")
var correctanswer1= document.getElementById("correctanswer1");
var incorrect11 = document.getElementById("incorrect11");
var incorrect12 = document.getElementById("incorrect12");
var incorrect13 = document.getElementById("incorrect13");
function saveData(){ var input = document.getElementById("saveServer"); localStorage.setItem("server", input.value); var storedValue = localStorage.getItem("server"); }
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
