F
F
Ftffggf2022-04-02 21:46:22
HTML
Ftffggf, 2022-04-02 21:46:22

How to make sure that information from one page is transferred to others?

I need to pass information from one page to another. Below is the code, how can I make the information that is entered into the form be transferred to other pages in addition to the main page? I need to transfer information from one page to others. Below is the code, how to make the information that is entered into the form transmitted in addition to the main page to others?

The code itself is provided in the photos:
624899bd98891623709349.jpeg
624899f1f2480620365436.jpeg

Answer the question

In order to leave comments, you need to log in

2 answer(s)
T
ThunderCat, 2022-04-02
@ThunderCat

Cookies, session, localstorage.

N
Nadim Zakirov, 2022-04-03
@zkrvndm

This is how you write data:

localStorage.testovik = 'Здесь данные, которые ты хочешь сохранить...';

Where testovik is the key you will later access, it can be almost anything.
And then you extract it on another page:
infa = localStorage.testovik;
console.log(infa); // Выводим в консоли

I just warn you that only strings can be stored this way, that is, only text.
Objects and arrays must first be converted to text before being pushed into localStorage .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question