日期:2014-05-17 浏览次数:20803 次
<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