I am trying to save an options tag value to local storage. After saving its value to local storage I would like to be able to set the options tag to the option the user sele
Its because your values and text are different for your select options. Try:
document.getElementById("fruit").onchange = function() {
localStorage['fruit'] = document.getElementById("fruit").value;
}
window.onload= function(){
if(localStorage['fruit'])
document.getElementById("fruit").value = localStorage['fruit'];
}