I'm putting a two part web form together. The first page is simply a text box asking for an email address and a subscribe button, the second page is the actual web form. I'm wondering what's the HTML code so when a user inputs their email in the text box and clicks subsc开发者_运维技巧ribe, how can the email inputted be transferred to the email text box on the second form. So when the user sees the web form their email is already filled in? Thanks.
To do that you would have to save it the original email in a cookie. Then on the second page in the body onload create a function that retrieves that value from the cookie and sets it to the input box. I would recommend jQuery to ease the task.
- Store email at server.
- Store email at cookies
since you are not using any server side programming language or don't want to tell us you can use javascript set onsubmit to setup a cookie with your email and then on next form output that cookie.
精彩评论