Difference between id and name attributes in HTML

前端 未结 19 2771
感动是毒
感动是毒 2020-11-22 05:17

What is the difference between the id and name attributes? They both seem to serve the same purpose of providing an identifier.

I would lik

19条回答
  •  有刺的猬
    2020-11-22 05:44

    This link has answers to the same basic question, but basically, id is used for scripting identification and name is for server-side.

    http://www.velocityreviews.com/forums/t115115-id-vs-name-attribute-for-html-controls.html

提交回复
热议问题