+ 1
Difference between id and name attributes of input
<input id="searchitem" name="search" type="search" /> what is use of id and name here and what is difference between them??
3 Answers
0
id and name are identifiers to access these objects in dom with javascript or some other language. ideally every element should have id, but angular enforce to have unique name available.
+ 1
The value of input is saved in id or name?
0
none. value is saved in value attribute. id is used to access control.