I’m new in Php/Mysql/Javascript. I’m learning it.
In my Html form there are 5 fields:
- Status
- Email Address
- Username
- Password
- Agree button.
My question is “How do I get same email address to the username field ?”
Ex: Status = Mr, Email Address = emailaddress@yahoo.com, and It’s should automatically fill the username field with this Email address. I believe it’s can be done with Javascript. Because of javascript is a client side script.
I will tell using jQuery :-
Or if you strictly want to use Javascript, use getElementById method,
You can add jquery plug-in into your script. Download it from here http://jquery.com/
After downloading, give path of jquery.js file above your code in as shown below :