Created
July 28, 2017 14:15
-
-
Save atsea/7af97d7cadb797777ad54def302ef9b5 to your computer and use it in GitHub Desktop.
Pass field text value to another page using localstorage.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* PASS TITLE TO ANOTHER PAGE | |
* | |
* Saves title text from form via localStorage to display on success page. | |
* @type {Object} | |
*/ | |
var m={title:$('.udel--title h1').text()}; | |
localStorage.setItem('udel_frm_title', JSON.stringify(m)); | |
//GET | |
var gm =JSON.parse(localStorage.getItem('udel_frm_title')); | |
console.log('title' + gm.title); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment