您好,欢迎来到玄塔游戏。
搜索
您的当前位置:首页把文件上传按钮修改成自己喜欢的样式

把文件上传按钮修改成自己喜欢的样式

来源:玄塔游戏


1.在模态框里写文件的上传
2.修改input为file的样式
默认是“选择文件”,直接在后面显示文件的名字
解决:修改样式
方法如下:

 <form action="http://localhost:8080/GD/UploadAction_execute.action" method="post" enctype="multipart/form-data" name="uploadfile">
 <input type="file" name="my" id="file" value="浏览" style="display: none;" 
 onchange="document.uploadfile.filePath.value=this.value"/>
 <input type="text" name="filePath" id="filePath"/>
 <input type="button" value="浏览..." onclick="document.uploadfile.my.click()"/><br>
 <input type="submit" value="上传" id="shangchuan">
 </form>

Copyright © 2019- xuata.com 版权所有

违法及侵权请联系:TEL:199 18 7713 E-MAIL:2724546146@qq.com

本站由北京市万商天勤律师事务所王兴未律师提供法律服务