解决type=file 文件修改表单 名称不能正常回显的问题

easyui 框架下   代码如下:

css:

.file_box{
float: right;
width: 1035px;
border: 1px solid #999;
height: 32px;
line-height: 35px;
padding-left: 10px;
margin-right: 25px;
}
.file{
float: right;
outline: none;
border:none;
background: #67BEF4;
border-radius: 4px;
padding: 4px 12px;
cursor:pointer;
color: #fff;
font-size:18px;
line-height: 20px;
vertical-align: middle;
margin: 2px;
}

html 页面:

<div class="file_box">
<button type="button" class="file" id="select_file" onclick="file1.click();" > 选择附件</button>
<input type="file" id="file1" name="PXXA_APPENDIX" style="width:250px;display: none;" onchange="setfile_tmp()";>
<input type="text" id="file2" readonly="readonly" th:value="${map.PXXA_APPENDIX}" onclick="file1.click(); ">
</div>

js脚本:

function setfile_tmp(){

var file11 = $("#file1")[0].value;
var arrays1 = file11.split("\\");
var name1 = arrays1[arrays1.length-1];
name1=name1.toLowerCase();
$("#file2")[0].value=name1;
}

总结

标签:
type,file,文件修改表单

免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
狼山资源网 Copyright www.pvsay.com

RTX 5090要首发 性能要翻倍!三星展示GDDR7显存

三星在GTC上展示了专为下一代游戏GPU设计的GDDR7内存。

首次推出的GDDR7内存模块密度为16GB,每个模块容量为2GB。其速度预设为32 Gbps(PAM3),但也可以降至28 Gbps,以提高产量和初始阶段的整体性能和成本效益。

据三星表示,GDDR7内存的能效将提高20%,同时工作电压仅为1.1V,低于标准的1.2V。通过采用更新的封装材料和优化的电路设计,使得在高速运行时的发热量降低,GDDR7的热阻比GDDR6降低了70%。