Lesson02_04 表單標(biāo)簽(2)
選擇上傳文件:<input type="file">
要將method設(shè)置為post.將enctype=multipart/form_date
代碼如下: <form> <input type="file"> </form> | 效果如下: |
在表單上創(chuàng)建一個(gè)圖像文件:<input type="image">
沒有value屬性,圖像可以代替提交按鈕,同時(shí)還提交單擊鼠標(biāo)時(shí)的XY坐標(biāo)
代碼如下:
<input type="image" name="" src="">
在表單上創(chuàng)建一個(gè)下拉列表框:<select></select><option></option>
<option>中的value用于設(shè)置傳送的內(nèi)容,如不設(shè)則為<option></option>中的內(nèi)容
代碼如下: <form> <select> <option>中國(guó)</option> <option></option> <option>老美</option> </select> </form> | 效果如下: 中國(guó)老美 |
代碼如下: <form> <select size=2> <option>中國(guó)</option> <option></option> <option>老美</option> </select> </form> | 效果如下: 中國(guó)老美 |
代碼如下: <form> <select multiple size=2> <option>中國(guó)</option> <option></option> <option>老美</option> </select> </form> 按著Ctrl可以多選 | 效果如下: 中國(guó)老美 |
代碼如下: <form> <select multiple size=2> <option selected>中國(guó)</option> <option></option> <option>老美</option> </select> </form> 按著Ctrl可以多選 | 效果如下: 中國(guó)老美 |
在表單上創(chuàng)建一個(gè)多行輸入的文本區(qū):<textarea></textarea>
沒有value屬性
代碼如下: <textarea cols=20 rows=10>請(qǐng)輸入內(nèi)容</textarea> | 請(qǐng)輸入內(nèi)容 |
在表單上創(chuàng)建一個(gè)多行輸入的文本區(qū):<label>
可以用這個(gè)標(biāo)簽來設(shè)定快捷鍵
代碼如下:<form> | 效果如下: 姓名: |
代碼如下:<form> | 效果如下: 姓名: |
相關(guān)文章
HTML 絕對(duì)路徑與相對(duì)路徑概念詳細(xì)
這篇文章主要介紹了HTML 絕對(duì)路徑與相對(duì)路徑概念詳細(xì),本篇文章通過簡(jiǎn)要的案例,講解了該項(xiàng)技術(shù)的了解與使用,以下就是詳細(xì)內(nèi)容,需要的朋友可以參考下2021-08-08html頁(yè)面head區(qū)域的編碼書寫規(guī)范
我們這里所說的head區(qū)域,是指頁(yè)頁(yè)html代碼的<head>和</head>之間的內(nèi)容。在jb51.net的文章中,主要介紹了大量的css知識(shí),而對(duì)html頁(yè)面的知識(shí)介紹并不是很多。2008-08-08