javascript - Creating a html page that store data dynamically -


i want create html page, when entered text in text area, text should populated page , when closed page , opened again, entered data should seen there. please me achieve this...

i dont want of php.

please refer below image trying my page trying make

you can save data on client using window.localstorage (or use fallback cookies), example implementation like:

// tiny utils save , load entered text const savetext = (text) => localstorage.setitem('text', json.stringify(text)) const loadtext = () => json.parse(localstorage.getitem('text'))  // reference our `textarea` , listen changes document   .queryselector('textarea')   .addeventlistener('change', evt => savetext(evt.target.value))   // somewhere else in app, e.g. on load, prefill textarea document.queryselector('textarea').value = loadtext() 

Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

How to get the ip address of VM and use it to configure SSH connection dynamically in Ansible -

javascript - Get parameter of GET request -