把文件上传按钮修改成自己喜欢的样式
来源:懂视网
责编:小采
时间:2020-11-27 20:13:31
把文件上传按钮修改成自己喜欢的样式
把文件上传按钮修改成自己喜欢的样式:1.在模态框里写文件的上传 2.修改input为file的样式 默认是选择文件,直接在后面显示文件的名字 解决:修改样式 方法如下: <form action="http://localhost:8080/GD/UploadAction_execute.action"
导读把文件上传按钮修改成自己喜欢的样式:1.在模态框里写文件的上传 2.修改input为file的样式 默认是选择文件,直接在后面显示文件的名字 解决:修改样式 方法如下: <form action="http://localhost:8080/GD/UploadAction_execute.action"

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>
把文件上传按钮修改成自己喜欢的样式
把文件上传按钮修改成自己喜欢的样式:1.在模态框里写文件的上传 2.修改input为file的样式 默认是选择文件,直接在后面显示文件的名字 解决:修改样式 方法如下: <form action="http://localhost:8080/GD/UploadAction_execute.action"