Button to other html page | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
+ 1

Button to other html page

I have two html pages: example1.html, example2.html. Is it possible to make a button in example1.html, which do something in example2.html?

16th May 2018, 4:08 PM
B00350
B00350 - avatar
4 ответов
+ 2
You could do sonething with GET or POST methods of php
16th May 2018, 4:09 PM
Bebida Roja
Bebida Roja - avatar
0
So it isn't possible to make via JavaScript?
16th May 2018, 4:12 PM
B00350
B00350 - avatar
0
I dont know but it is possible with php
16th May 2018, 4:12 PM
Bebida Roja
Bebida Roja - avatar
0
yes its possible via the session storage in you browser its accessible to js and you can save variables there. means on example1 you could run a function with sets a variable and a meta tag for redirection and the js code on the second page checks for the variable and runs if its set but most of the time its not nessesary( you also could chang the text of a tag or a display style attribut. with would make the example2 page useless and the use wouldnt had a reload time.
28th May 2018, 6:14 PM
Lexfuturorum
Lexfuturorum - avatar