第5課 ── 用力送出表單

by KitHuang

HTML

<!DOCTYPE html>
<html>
   <head>
      <title>新增商品</title>
   </head>
	
   <body>
      <form action="/add-product" method="POST" >
        1,商品名稱: <input type = "text" name = "name" />
         <br>
        2.價格: <input type = "text" name = "price" />
         <br>
        3.是否免運費:
        <br><input type ="checkbox" name = "fare_yes">是
        <br><input type ="checkbox" name = "fare_no">否
        <br>
        4.性別:
        <br><input type="radio" name="sex" value="male" checked>男
        <br><input type="radio" name="sex" value="female">女
        <br>
        5.類別:
        <br><select name = "category">
            <option value = "top" selected>上衣類 </option>
            <option value = "coat ">外套類</option>
            <option value = "trousers">下身類</option>
            <option value = "accessories">配件類</option>
            </select>
        <br>
         6.商品備註:<br>
         <textarea rows = "5" cols = "30" name = "remark">
         </textarea>
         <br>
         <input type="submit" value="Submit">
</form>
   </body>
	
</html>

CSS

form{padding:10px;
margin:10px;}