2.2 input 標籤的類型與屬性

HTML5 新的 input 標籤類型

例:

上述範例的 codepen 網址: https://codepen.io/carlos411/pen/vYOmaoE

參考:HTML Input Types

建立 form_get_post.html,測試 GET 與 POST:https://codepen.io/carlos411/pen/RwzwayG

建立 form_file_post.html , 測試檔案的 POST:https://codepen.io/carlos411/pen/zYVYqjQ

HTML5 新的 input 標籤屬性

例:

其中 readonlydisabled 需要特別留意,加上 disabled 屬性的欄位,在表單送出資料的時候,並不會送出資料。如果要送出資料,可以使用 readonly 屬性。

參考:HTML Input Attributes

Last updated