在我們web前端的學(xué)習(xí)中 input表單的用途十分廣泛,下面讓我為大家簡單介紹它吧
<input type=" text" placeholder=" ">
placeholder是提示性文本,
我們可以看到一下網(wǎng)頁的搜索框里面有請輸入這幾個字 這個就是placeholder的作用
<input type="button">
這個是按鈕,我們在網(wǎng)頁里看到的按鈕就是這樣制作的
<input type="file">
這個用于文件上傳,可以選擇自己需要上傳的文件
<input type="reset">
這個是表單重置按鈕
<input type="submit">
這個是表單提交按鈕
<input type="radio">
這個是單選按鈕,用來在網(wǎng)頁中給用戶做選擇用的
<input type="checkbox">
這個是多選框,在網(wǎng)頁中可以給用戶提供更多的選擇
<input type="password">
這個是密碼框,當(dāng)我們在這個框里輸東西的時候,它不會顯示內(nèi)容
會顯示小點(diǎn)點(diǎn),這樣就保護(hù)了我們的隱私
<select name="">
<option value="">列表1</option>
<option value="">列表2</option>
<option value="selected">列表3</option>
</select>
這個就是下拉列表了,selected是默認(rèn)選中的意思,現(xiàn)在我們寫的就是默認(rèn)選中列表3了