!!重要連結後端數據庫的表單(會員註冊、購買商品)
action⇒資料要傳去的目的地,進去的method有兩種:get(預設) 及post
get狀態會使用input資料呈現在網址列並有上限255字元,post則不會,輸入帳號密碼時一定要用post
label⇒input的欄位名稱,label 的for對應input的id,就可以點擊label選取input輸入匡內容
input⇒使用者輸入的內容
buttom⇒type=”submit”按下會把資料傳進後端**(如果buttom沒有在form裡就沒有這個功能)**
另外三個常用的表格標籤
select下拉式選單,搭配option選單,建議第一個選項可設定為空白搭配required
datalist:使用者可輸入值的選單
需要配對<datalist id="areaList"> 及<input list="areaList”
textarea:可讓使用者輸入一大串字,常用屬性cols/rows/placeholder
comment註解:程式碼會忽略,讓自己容易看得懂程式碼用的⇒comment鍵+/
https://www.w3schools.com/html/html_blocks.asp
block-level elements in HTML:
<address><article><aside><blockquote><canvas><dd><div><dl><dt><fieldset><figcaption><figure><footer><form><h1>-<h6><header><hr><li><main><nav><noscript><ol><p><pre><section><table><tfoot><ul><video>