Тёмный

javascript local storage pass value one html web page to another 

Haritha Computers & Technology
Подписаться 43 тыс.
Просмотров 148 тыс.
50% 1

#htmllocalstorage #passvariableonepagetoanotherpage
javascript local storage pass value one html web page to another
In web development, it is often necessary to transfer data between different web pages. One efficient method to achieve this is by utilizing JavaScript's local storage feature. Local storage allows developers to store key-value pairs within the user's browser, enabling seamless data transfer between pages. In this article, we will explore how to pass values from one HTML web page to another using JavaScript local storage.
Conclusion:
JavaScript's local storage provides a convenient way to pass values between different HTML web pages. By storing key-value pairs in the local storage object, you can easily transfer data from one page to another. This method proves particularly useful when developing web applications that require state persistence across multiple pages. Utilize this approach effectively to enhance the user experience and create dynamic and interactive web applications.

Опубликовано:

 

10 мар 2019

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 169   
@adolfocarrillo248
@adolfocarrillo248 2 года назад
Holy cow!!!, this is so exactly what I need!!!! Thank you for sharing your knowledge
@syskey1402
@syskey1402 Год назад
same!
@suvarnadhavale2882
@suvarnadhavale2882 2 года назад
thank you sir.....it's really amazing ,i try lots for cods over the internet but no one is working...you can explain in very simple way ,it's really helpful for us ..thank you sir...
@franciscocatanach2257
@franciscocatanach2257 Год назад
Ur voice is honestly so satisfying to listen to
@GalaxyCookies76
@GalaxyCookies76 4 года назад
how to get more values from and display it.?
@codewithmadrine7843
@codewithmadrine7843 Год назад
Holly Molly! Have been looking for this for almost 1 week, Thanks Geeks
@rishbharora4246
@rishbharora4246 4 года назад
Loved The Video! Keep up the spirit! Saved My Life!
@iseliodelisi3671
@iseliodelisi3671 4 года назад
Hi! Thanks your video i was able pass a variable to another page, thanks a lot!
@sadamali6691
@sadamali6691 2 года назад
Waaw how lucky i am i was searching this kind of video about a week and i didn't find nothing but to night when i opened the RU-vid this video pop's up waaw pro you have got new subscriber thank you and this is what I excectly needed
@olo-onlyliveonce
@olo-onlyliveonce 2 года назад
So much search... Finally found you! Thank you so much I dropped a like and subed!!! Keep it up
@shoney6289
@shoney6289 3 года назад
Super Duper Excellent Video sir, GOD bless you with lot of happiness and Success. 😍😍😍😍😍😍🥰
@Mohamed-eq3hj
@Mohamed-eq3hj 2 года назад
Can't believe this,, i spent the entire day looking out for how to do this, i tried everything but nothing worked, And its THAT EASY !!!!!! thanks so much man
@appleid3223
@appleid3223 2 года назад
Same here, exactly what I needed.
@padmanabhmalwade2750
@padmanabhmalwade2750 2 года назад
Thank you soo much sir I've been tring trying since a week now it worked successfully!!!
@009-shrabantide9
@009-shrabantide9 2 года назад
Thank you so much for saving my life by showing the code ... thank you
@bhagyashreemore1045
@bhagyashreemore1045 5 лет назад
thank you so much for this video i have been searching for this since month.. :) keep making such videos
@HarithaComputersTechnology
@HarithaComputersTechnology 5 лет назад
Thanks Bhagyashree
@ainiexperiencias
@ainiexperiencias 2 года назад
Thank, thank and thank!!!! That is exactly what I need
@dchubad
@dchubad 2 года назад
very strait forward, thumbs up
@jatindhariwal8352
@jatindhariwal8352 3 года назад
Thanks! It was really help full.
@CaptionThisChallenge_
@CaptionThisChallenge_ 4 года назад
Thanks bro....You saved my life
@leniangraeni9796
@leniangraeni9796 4 года назад
Thank you so much sir. I'm very grateful to find this video^^
@HarithaComputersTechnology
@HarithaComputersTechnology 4 года назад
You're very welcome!
@arazmammadov9276
@arazmammadov9276 4 года назад
Thank you so much!
@adityabanare9354
@adityabanare9354 2 года назад
finally found the video Really helpful awesome
@syskey1402
@syskey1402 Год назад
Thanks so much dude. RESPECT!!
@magorzataannaniczyporuk7953
@magorzataannaniczyporuk7953 4 года назад
Thank you SO much sir! It helped me so much to advance with my project!
@HarithaComputersTechnology
@HarithaComputersTechnology 4 года назад
Thanks mate..!
@umamaheswarid2675
@umamaheswarid2675 3 года назад
@@HarithaComputersTechnology how to pass many data
@mattb8426
@mattb8426 3 года назад
You are a lifesaver!
@jirayutphonyiam6220
@jirayutphonyiam6220 4 года назад
I love this!!
@juniord_osbel
@juniord_osbel 4 года назад
THANK YOU SO MUCH BRO!!
@wicker1094
@wicker1094 Год назад
Very nice video. Very short and correct.
@musicloop9582
@musicloop9582 3 года назад
Please use some good free editors. You will get better syntax checking. Notepad+ is not enough. In your code, you have the opening tag inside the section and the closing tag is inside the . Also, I don't know why you have put inside the head. Please make the corrections.
@robertoriosmorales7528
@robertoriosmorales7528 2 года назад
this was so useful, thanks
@bmfahim7321
@bmfahim7321 2 года назад
thank you very much it was very helpful
@xulum1299
@xulum1299 3 года назад
thank you!
@lechapolin
@lechapolin 4 года назад
literally it saved my job. thanks!
@HarithaComputersTechnology
@HarithaComputersTechnology 4 года назад
Thanks mate..!
@neuaction
@neuaction Год назад
well done sir , you should share more such advanced videos, i have been looking for such videos almost for 3 months
@HarithaComputersTechnology
@HarithaComputersTechnology Год назад
Thanks Keep watching! and created a new javascript tutorials, passing multiple elements into a next page please visit sir !
@MdMusa-dy3ci
@MdMusa-dy3ci 4 года назад
Good explanation
@sanityvortexx
@sanityvortexx 3 года назад
it worked thanks man👍
@genesislumapay9416
@genesislumapay9416 3 года назад
does it only work on span tag? I tried passing data from input to another input and it doesnt work
@lucasrodriguez3511
@lucasrodriguez3511 2 года назад
You are amazing bro!!
@AymanLkhawa
@AymanLkhawa 3 года назад
Thank you so much sir!!
@raphaelrp4718
@raphaelrp4718 2 года назад
Thanks a lot bro!
@souvikparui8233
@souvikparui8233 4 года назад
Thanks you.....
@adnan8465
@adnan8465 Год назад
thank you so much man
@Ic3m4te
@Ic3m4te 4 года назад
thanks sir, u helped me so much!!
@HarithaComputersTechnology
@HarithaComputersTechnology 4 года назад
Thanks mate!
@tiborifj.fazekas6251
@tiborifj.fazekas6251 3 года назад
Awesome video!
@neutronstar77
@neutronstar77 2 года назад
I got it, Thank you ver much!
@manaleeorpe3954
@manaleeorpe3954 Год назад
this helped a lot
@bobbysidhu5894
@bobbysidhu5894 2 года назад
Thanks
@flavioherrera9954
@flavioherrera9954 4 года назад
bless you
@ktkkoko4331
@ktkkoko4331 3 года назад
Thanks sir I really like it
@simpletextentertain8927
@simpletextentertain8927 7 месяцев назад
can it work with or or text element else ?
@gabrielamagrani1506
@gabrielamagrani1506 3 года назад
Obrigada por esse video! (:
@jirayutphonyiam6220
@jirayutphonyiam6220 4 года назад
I spend time for hour to find a bug. It is "onclick" ,NO "oneclick" I wanna cry
@heavygustav
@heavygustav 4 года назад
hahahaahhaah....it happens bro stay vigilant
@timhoward5
@timhoward5 3 года назад
I find "=" instead of "-"
@phanishwarlal4838
@phanishwarlal4838 3 года назад
these bugs really suck!
@manojkumarsingh7463
@manojkumarsingh7463 2 года назад
Haaaaaaaaaaaaaaaaa 🤣🤣🤣🤣 also it happens with me
@matyasmeszaros2227
@matyasmeszaros2227 2 года назад
I had the same issue today with 'foreach' instead of 'forEach' lol
@kazukamancha9664
@kazukamancha9664 5 месяцев назад
thanks you sir, you help me in my homework
@HarithaComputersTechnology
@HarithaComputersTechnology 5 месяцев назад
Glad to hear that
@MARWATTECHS
@MARWATTECHS 4 года назад
nice sir
@rushikeshrakshe8470
@rushikeshrakshe8470 Год назад
Really ThanQ sir
@sunilsrinivaas3424
@sunilsrinivaas3424 Год назад
Thank you so much sir
@lazizinerie
@lazizinerie 2 года назад
You're a javascript wizard
@gamersverse15
@gamersverse15 2 года назад
thank you so much
@JustGame7
@JustGame7 2 года назад
simple and neat, thank you, how can pass and get the same values,, like we use register and login form
@danimichely2723
@danimichely2723 2 года назад
Muito obrigada, senhor. Você me ajudou muito!
@aryanmathur
@aryanmathur 3 года назад
THANK YOU SO SO SO SO MUCHHHHHH!!!!!!!!!!!!!
@videloco84
@videloco84 4 года назад
THX!!!!!!!!!!!!!!! I was lost and found your video
@HarithaComputersTechnology
@HarithaComputersTechnology 4 года назад
Thanks mate ..!
@ZeddyBoi786
@ZeddyBoi786 2 года назад
Thank you sooo much i have been looking for this for ages ... but one thing... can you please explain how i can do this but just with buttons .. e.g. if i have a train station map i just need to press the train station buttons rather than typing in the train station names and then when i press departure station and arival station it displays from... to ... on a new page
@harishhona
@harishhona Год назад
Spent an hour with my lab teacher, and here he solved it within 6 and half minutes.
@HarithaComputersTechnology
@HarithaComputersTechnology Год назад
please check my new javascript tutorial playlist, you can find passing multiple selected elements
@doublehead1973
@doublehead1973 3 года назад
This is working wonderfully locally. Im trying to pass date selector data to another page where it creates a custom URL inside an based on the dates (hotel date selector). But as soon as I add the script to wordrpess, it wont pull the localstrorage. Is there any special consideration needed here? I added the scripts to the header and footer of the whole site... Its getting a url string but missing the dates. Works perfect locally with html... I tested the html on the server, works perfect. I can even point the HTML form to the wordpress result page and it works. Therefore it's on the form page (page 1) that somehow fails to follow the header script and store the variables on localstorage. Any ideas?
@doublehead1973
@doublehead1973 3 года назад
Lol nevermind, I solved it. Missing a line of code (lol)
@afguideshd913
@afguideshd913 3 года назад
Where did you get a firstname from javascript?
@bruhda.a
@bruhda.a 2 года назад
why did you do "return false" in function passValues ?
@zachfenton608
@zachfenton608 3 года назад
nice and short video on how to get to another page! Is there a way I can have it pull data from another page. Like I have a page with the events and I want it to call the top 4 events to my homepage from the event page.
@rashidmehmood7948
@rashidmehmood7948 4 года назад
thanku so much gentleman
@HarithaComputersTechnology
@HarithaComputersTechnology 4 года назад
Thanks mate ..!
@garifalo1
@garifalo1 4 года назад
why the function return false?
@arcoding823
@arcoding823 2 года назад
What to do if you use to pass it then gets alerted and the info will be in the other html
@saharshpanjala
@saharshpanjala 2 года назад
it dint work for me it dint show up the variable in the span area
@chanakaramanayake8409
@chanakaramanayake8409 3 года назад
thanks..
@salahsallami5522
@salahsallami5522 Год назад
Tank you
@vivoichsan1208
@vivoichsan1208 6 месяцев назад
Sir, what if you use a dropdown list or radio button, what would the syntax be like if you wanted it to appear on the next page
@HarithaComputersTechnology
@HarithaComputersTechnology 6 месяцев назад
i already made that tutorial .. please check this playlist you can find more than 150+ client side javascript tutorials ru-vid.com/group/PL5smYbP6KikPLQmfizfQSg-3cep7DzLUq
@jettarinpattanajirarutchag9929
if the data is radio button or checkbox. how can I pass? thank you for the answer.
@history7528
@history7528 2 года назад
what if i want to generate the all page
@adityaparulekar7159
@adityaparulekar7159 3 года назад
How do you do the same, but for radio button instead of textbox?
@jettarinpattanajirarutchag9929
I am waiting the answer too.
@front-enddeveloper-cf1jn
@front-enddeveloper-cf1jn Год назад
ooooo goood thankyou bro oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo
@HarithaComputersTechnology
@HarithaComputersTechnology Год назад
thanks man!
@HarpreetKaur-lg1sf
@HarpreetKaur-lg1sf 2 года назад
how can i use a textbox to capture that value?
@chelseafraher9392
@chelseafraher9392 4 года назад
Gracias bro! A lo mejor no me entiendes, pero si jalo SIUUUUUUUUU
@damaraeneritzcejagarcia8025
@damaraeneritzcejagarcia8025 4 года назад
Chelseaaaaaaaaaaa!
@chelseafraher9392
@chelseafraher9392 4 года назад
@@damaraeneritzcejagarcia8025 D:
@oyash516
@oyash516 4 года назад
How to pass multiple variables ?
@paulolinks1
@paulolinks1 Год назад
it is possible to define a value( "red car") in an image and on click the name "red car" print on another page?
@HarithaComputersTechnology
@HarithaComputersTechnology Год назад
yes ! i make new video on javascript front end coding. Please check my latest videos
@jenniferlacaste1383
@jenniferlacaste1383 4 года назад
It doesn't work on my explorer but it works fine with firefox and chrome.
@handrew9894
@handrew9894 3 года назад
why must i return false?
@pradumkumar6933
@pradumkumar6933 4 года назад
Sir I will follow your all instructions and I will done but when I will try to pass multiple page values to one page then I can't. Please help, waiting for your reply. Thanku
@muhammadbilal6865
@muhammadbilal6865 4 года назад
try it firstpage Sign Up Form Email: Password Mobile: Telephone: second pagehtml The name is : js function getData() { var email = document.getElementById("email").value; localStorage.setItem("txtValue", email); } document.getElementById("data").innerHTML=localStorage.getItem("txtValue");
@irinabacal9598
@irinabacal9598 2 года назад
Hello. Nice video. Is it possible to pass multiple values from one page to another? I have an input where you can add words and they are displayed in the same page and I need to pass those values to the next page in order to display them there.
@hammerTime11
@hammerTime11 2 года назад
You can make use of form tag and pass it on to the required field
@abiyuvan9261
@abiyuvan9261 5 лет назад
Pls respond soon after submit only one data we are getting how to display multiple inputs on tabls
@pramodhvedula8314
@pramodhvedula8314 3 года назад
Take multiple variables and pass by id or class name
@gloft6523
@gloft6523 3 года назад
Pramodh Vedula how?
@akhils9663
@akhils9663 3 года назад
@@pramodhvedula8314 sir how?
@joybarmon3608
@joybarmon3608 4 года назад
nice
@HarithaComputersTechnology
@HarithaComputersTechnology 4 года назад
Thanks mate ..!
@dronareddy3613
@dronareddy3613 4 года назад
HOW CAN WE DO IT FOR MULTIPLE VALUES
@indrawanprast1772
@indrawanprast1772 3 года назад
@Swapnil Prakash I tried and it still doesn't wor :(
@bhanuvasantha2353
@bhanuvasantha2353 3 года назад
Sir is it possible to keep a image instead of text
@bharatns598
@bharatns598 3 года назад
how to do this in reactjs
@akhils9663
@akhils9663 3 года назад
Can you please give me a solution for transfering multiple variable?
@aakashgupta7708
@aakashgupta7708 4 года назад
Cannot set property 'innerHTML' of null facing this error. Please give solution
@muhammadbilal6865
@muhammadbilal6865 4 года назад
try it firstpage Sign Up Form Email: Password Mobile: Telephone: second pagehtml The name is : js function getData() { var email = document.getElementById("email").value; localStorage.setItem("txtValue", email); } document.getElementById("data").innerHTML=localStorage.getItem("txtValue");
@bharathiyandra166
@bharathiyandra166 5 месяцев назад
Hi @aakashgupta7708 is it resolved?
@prathmeshbankar8059
@prathmeshbankar8059 Год назад
after 2 hours 😭😭😭😭😭😭 finally issue solved
@maths4allbysrinivas
@maths4allbysrinivas 3 года назад
Video quality is low,720p also not visible clearly.data consumes more.
@mdiqbal7168
@mdiqbal7168 2 года назад
How to decrease time for send data from page1.html file to page2.html file
@anujmore7547
@anujmore7547 4 года назад
Im not getting my next page? what should i do.
@hakdoghakdog4812
@hakdoghakdog4812 4 года назад
Same :
@mihaiimihaii5530
@mihaiimihaii5530 4 года назад
same dont work
@muhammadbilal6865
@muhammadbilal6865 4 года назад
check it firstpage Sign Up Form Email: Password Mobile: Telephone: second pagehtml The name is : js function getData() { var email = document.getElementById("email").value; localStorage.setItem("txtValue", email); } document.getElementById("data").innerHTML=localStorage.getItem("txtValue");
@yatinkher2679
@yatinkher2679 2 года назад
Sir can you please make drop down form get value
@handlebyme46
@handlebyme46 11 месяцев назад
sir ap na ak field ka btay aghr multiple field ho input ki tb kysa kry gy
@HarithaComputersTechnology
@HarithaComputersTechnology 11 месяцев назад
please check my other video in the javascript playlist, you can sending multiple values to the next page, thanks
@khamei8094
@khamei8094 4 года назад
It doesn't work in my test file 😞😞 waiting for your reply.
@muhammadbilal6865
@muhammadbilal6865 4 года назад
tr it firstpage Sign Up Form Email: Password Mobile: Telephone: second pagehtml The name is : js function getData() { var email = document.getElementById("email").value; localStorage.setItem("txtValue", email); } document.getElementById("data").innerHTML=localStorage.getItem("txtValue");
Далее
Pass a Variable Value from One HTML Page to Another
12:24
An Introduction to Local Storage with JavaScript
14:17
How to Use Local Storage in JavaScript
15:23
Просмотров 283 тыс.
Understanding JavaScript Storage Events
16:55
Просмотров 3,3 тыс.
Get Textbox Value and Display on Page | JavaScript
8:36