Anda sedang menonton: Perbedaan .com dan .id
I would like to understand (specifically v regards come HTML forms) even if it is or not melihat both is necessary or motivated for any kind of reasons.
The name attribute is tangan kedua when sending out data in a form submission. Berbeda controls respond differently. Because that example, you may have actually several radio buttons with different id attributes, but the exact same name. When submitted, there is hanya the one worth in the solution - the radio button you selected.
Of course, there"s an ext to it 보다 that, but it will certainly get you reasoning in the appropriate direction.
Use name characteristics for membentuk controls (such as and also ), as that"s the identifier used in the post or GET panggilan that wake up on form submission.
name corresponds to the form element and also identifies what is postedback come the server.
The way I think about it and use the is simple:
name is used for form handling top top the server as soon as a form is it is registered via HTML (it needs to be unique in a membentuk - to some extent, view Paul"s comment below).
See id= vs name=:
What’s the difference? The short answer is, use both and don’t worry about it. But if you desire to understand this goofiness, this is the skinny:
id= is for usage as a membidik like this: for links like this: .
name= is also used to merek the fields in the blog post send come a server through an HTTP (HyperText transfer Protocol) obtain or write-up when girlfriend hit send in a form.
Sometimes the name= and id= names will differ, due to the fact that the server is expecting the exact same name indigenous various formulir in the same file or variasi radio buttons in the same form as in the example above. The id= should be unique; the name= must not be.
Lihat lainnya: Surah Al Alaq Ayat 5 - Surah Al 'Alaq Ayat 5