html5文件上传控件的button样式怎么修改

html-css012

html5文件上传控件的button样式怎么修改,第1张

直接写

CSS样式

是不行的

<input

type="text"

size="20"

name="upfile"

id="upfile"

style="border:1px

dotted

#ccc">

<input

type="button"

value="浏览"

onclick="path.click()"

style="border:1px

solid

#cccbackground:#fff">

<input

type="file"

id="path"

style="display:none"

onchange="upfile.value=this.value">

写成这样,用一个text和一个button替代file,然后让file隐藏

要学会用百度、谷歌等搜索引擎,一般都有现成的答案了,不用再提问一次,这样挺浪费自己的时间的,http://www.haorooms.com/post/js_inputfileupload