Today, when I was working on a job interview, David asked me to add a title: The difference between ID and name in HTML. A listen to Ah, the HTML ID and name what is the difference, but usually in use, not how to think, just so use it, oh, in fact,
I haven't figured out the difference between name and id in input till now. I have encountered this problem in my study. I 've been sorting out the collected information for a long time before I can use it as a website, however, we have not yet
A long time ago, I remember in ASP. net, as long as the name attribute is added to the server control, there will be a warning, as shown in, over time, that for HTML, the name attribute is redundant and can be removed, until ASP. the emergence of
The difference between name and id in the input box, And nameid in the input box
1.
It can be said that almost everyone who has done Web development has asked, What is the difference between the element ID and Name? Why do I need a Name if I have an
The difference between name and id in the input box, And nameid in the input box
1.
It can be said that almost everyone who has done Web development has asked, What is the difference between the element ID and Name? Why do I need a Name if I have an
Difference between ID and name in Form (input)
However, name cannot be replaced in the following purposes:
1.Form Control name. The submitted data is controlled by the Control name rather than the ID. Because many names correspond to multiple
ID differs from name in HTMLA name can correspond to multiple controls at the same time, such as checkbox and radioAnd the ID must be the only one in the full-text filePurpose of the ID1) ID is the identity of the HTML element, mainly in the client
ID differs from name in HTMLa name can correspond to multiple controls at the same time , such as checkbox and radioAnd the ID must be the only one in the full-text filePurpose of the ID1) ID is the identity of the HTML element, mainly in the client
This is not a mistake, it is recommended to label the corresponding form element with the UX convenience. For example, the Name field:Then give an examplenazwa:Make the label's for point to the ID of input, so that when you click the label, input
Difference between ID and name in HTML
A name can correspond to multiple controls at the same time, such as checkbox and radio.
The ID must be unique in the entire document.
Purpose of ID1) ID is the identity of HTML elements, mainly used in client
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.