How I can get input and output in js

I don’t have that much of idea about JavaScript so, Can you guys please tell me “How I can get input from a HTML and save it using javascript and recalll it again”?

That’s not a question that can be answered in a sentence or two, or even a paragraph. That’s something where you’ll need to learn more about JS to be able to implement and understand.
Now understand, I’m still new and learning but I think that anything someone can put succinctly into a couple of sentences will not be something that someone with not much of an idea about JavaScript will understand.
I’ll be monitoring this for responses. I’m all about learning.

1 Like

You have an input Element inside a form Element.
onSubmit event you send a request as your server can handle (there’s not a single way to do that).

Your server process it, usually this involves validation, then save it in any sort of persisting memory, usually a database.

When you want to get that information back, you let your webpage perform a different request to your server, who will retrive the information in the database and send it back.


As you can see, the idea is pretty straightforward, yet it’s implementation is not. It requires knowledge in multiple fields.

By using dom element selector like document.getElementById(“id of text box”).value this will get the value of the input form or document.querySelector(“id or class or pseudo selector”).value and listen for a onsubmit or click of a button using addEventListener and using localStorage in javascript you can store and fetch data.