Re: [問題] input type有哪型態呢?
※ 引述《NTNUking (NTNU)》之銘言:
: 我遇到的問題是
: 我在form裡 有一個input 可是我想直接給他值 而不是讓使用者輸入
: 這樣我的 tpye是什麼呢?
: 這樣寫可以嗎 type="hidden" value ="<%= rs.getString("Password") %>"
可以的
: 還有... type到底有哪些型態阿@@?
: google爬了一下好像沒什麼資料^^"
type有:(就我記得的)
text 文字框
password 密碼框
checkbox 複選框(打勾的)
radio 單選圓點(圈圈, 點下去中間有一點的)
submit 送出按鈕, value為顯示的字
image 送出按鈕圖片, src為圖片網址, 可使用<img>的屬性
reset 重設按鈕, value為顯示的字, 按下去整個表單會重設回預設
hidden 隱藏欄位, 畫面上看不到但有欄位
另外 <select name="name">是選單
預設為下拉式 → ┌───┬─┐
│選項一│▽│
└───┴─┘ ┌───┬─┐
│選項一│▲│
當使用<select size=n> n≧2 即為開放式 → │選項二│█│
│選項三│ │
其中的選項用 <option>選項 指定 │選項四│▼│
└───┴─┘
也可以用 <option value="值">顯示字串 指定
(<option>123 和 <option value="123">123 相同)
記得要</select>掉
<select multiple>就會變成多選 就可以點選多個(配合CTRL) 開多選就一定是開放式
再來 <textarea name="name">是文字框 如右 ←──cols──→
┌───────┬─┐
<textarea>可以設cols和rows為大小 ↑ │ │△│
rows│ │ │
預設文字寫在<textarea>和</textarea>之間 ↓ │ │▽│
└───────┴─┘
這個也要記得結束掉
大致就這樣了
--
'Oh, Harry, dont't you see?' Hermione breathed. 'If she could have done
one thing to make absolutely sure that every single person in this school
will read your interview, it was banning it!'
---'Harry Potter and the order of the phoenix', P513
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.112.240.54
推
06/06 09:47, , 1F
06/06 09:47, 1F
推
06/06 10:29, , 2F
06/06 10:29, 2F
推
06/06 15:00, , 3F
06/06 15:00, 3F
討論串 (同標題文章)