+ 2

In forms why we need name="username" , name="password" attributes? There is no change without both of them in output.

<input type="text" name="username"/> <input type="password" name="password"/>

15th Apr 2017, 2:49 PM
Mursina
Mursina - avatar
6 Respuestas
+ 3
The name attribute specifies the name of an <input> element. The name attribute is used to reference elements in a JavaScript, or to reference form data after a form is submitted. Note: Only form elements with a name attribute will have their values passed when submitting a form.
15th Apr 2017, 4:38 PM
suraj pandey
suraj pandey - avatar
+ 5
"name" attribute is the navigator to .php file Ah....-_- My grammar is so bad.hell this.... Review at <datalist> lesson in html5. That can help you a lot
15th Apr 2017, 3:43 PM
Yanothai Chaitawat
Yanothai Chaitawat - avatar
+ 4
what?
15th Apr 2017, 3:25 PM
Mario L.
Mario L. - avatar
+ 2
if you are not submitting form than it is not necessary.
15th Apr 2017, 4:40 PM
suraj pandey
suraj pandey - avatar
+ 1
Thanks for all answers
7th Oct 2017, 5:46 AM
Mursina
Mursina - avatar
0
hi we are giving a specific group/class to know quickly (ie., suppose if we give name=username, the applicant should fill his /her username only.). And we can use placeholder attribute also, to know specifically. thank you.
18th Apr 2017, 1:50 PM
rakshith