当type="file"时,input框右侧的browse按钮可以换成图片:
<style>
div {width:350px;position:relative;}
.file {position:absolute;top:0px;right:350px;+top:0;+right:45px;width:0px;height:25px;float:left; filter:alpha(opacity=0);-moz-opacity:0;opacity:0;}
.txt {width:200px;height:25px;margin-right:5px;float:left;}
.btn {width:122px;height:32px;margin-top:0px;float:left;}
</style>
<div>
<form method="post">
<input type="text" name="txt" class="txt" />
<input type="image" src="http://ice-cream.iteye.com/upload/picture/pic/7511/36d6ffa2-1393-34af-9cf8-4e052a4b055a.gif?1201681519" class="btn"/>
<input type="file" οnchange="txt.value=this.value" size="35" class="file" />
</form>
</div>