(If something isnt wrote right, please edit, Im not SUPER good with english language) So i need save the Input’s Value in javascript, and Ive tried use .value with a selector, but it fails to return the value.
jquery function val() is not equivalent to "$(this).value="? This question had some valuable insight, but didnt answer my question.
var Value = document.getElementById("test").value;
function save() {
localStorage.setItem("note"}, Value);
}
(function() {
Value = localStorage.getItem("note"));
})();
Basically I tried to save my data from an input, Im using inputs in settings page of another project, and I need settings to reload once my page is reloaded.
<input id=“test” placeholder=“Write Here”>
<button onclick=“save()”>Execute</button>
So I really expected it to reload the value of my settings input, and have the data I saved there when I reloaded my page, but nothing happened. I want it to save my data and reload it on page entering.