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>
以上就是把文件上传按钮修改成自己喜欢的样式的详细内容,更多请关注php中文网其它相关文章!
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号