上传文件 将 浏览 利用滤镜 改样式
效果如图
[img]http://dl.iteye.com/upload/attachment/0064/6565/3f5acfc8-c756-3ef4-9778-20f2ee919901.jpg
[/img]
效果如图
[img]http://dl.iteye.com/upload/attachment/0064/6565/3f5acfc8-c756-3ef4-9778-20f2ee919901.jpg
[/img]
<style>
input{border:1px solid green;}
</style>
<BODY>
<form method="post" action="" enctype="multipart/form-data">
<input type="text" id="txt" name="txt">
<input type="button" onmousemove="f.style.pixelLeft=event.x-60;f.style.pixelTop=this.offsetTop;" value="请选择文件" size="30" onclick="f.click()">
<input type="file" id="f" onchange="txt.value=this.value" name="f" style="position:absolute;filter:alpha(opacity=0);" size="1" hidefocus>
<INPUT TYPE="submit">
</form>
</BODY>
详细出处参考:http://www.jb51.net/article/13019.htm