Solve the problem that the name of the type=file file modification form cannot be echoed normally

Solve the problem that the name of the type=file file modification form cannot be echoed normally

The code under the easyui framework is as follows:

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 page:

<div class="file_box">
<button type="button" class="file" id="select_file" onclick="file1.click();" > Select attachment</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 script:

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;
}

Summarize

This concludes this article about the problem that the name of the type=file file modification form cannot be echoed normally. For more related type=file content, please search for previous articles on 123WORDPRESS.COM or continue to browse the related articles below. I hope that everyone will support 123WORDPRESS.COM in the future!

<<:  Introduction to install method in Vue

>>:  How to set the width attribute to the style of the span tag

Recommend

How to get datetime data in mysql, followed by .0

The data type of MySQL is datetime. The data stor...

Deleting files with spaces in Linux (not directories)

In our daily work, we often come into contact wit...

MySQL Query Cache Graphical Explanation

Table of contents 1. Principle Overview Query Cac...

Explanation of MySQL performance inspection through show processlist command

The show processlist command is very useful. Some...

Vue makes a simple random roll call

Table of contents Layout part: <div id="a...

Detailed explanation of the cache implementation principle of Vue computed

Table of contents Initialize computed Dependency ...

...

How to handle spaces in CSS

1. Space rules Whitespace within HTML code is usu...

mysql 8.0.15 winx64 decompression version graphic installation tutorial

Every time after installing the system, I have to...

Installation, configuration and use of process daemon supervisor in Linux

Supervisor is a very good daemon management tool....

Mysql Workbench query mysql database method

Mysql Workbench is an open source database client...

Solution to MySQL Installer is running in Community mode

Today I found this prompt when I was running and ...

JavaScript imitates Xiaomi carousel effect

This article is a self-written imitation of the X...