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

Div nested html without iframe

Recently, when doing homework, I needed to nest a ...

Linux command line quick tips: How to locate a file

We all have files stored on our computers -- dire...

How to modify the ssh port number in Centos8 environment

Table of contents Preface start Preface The defau...

JavaScript implements mouse control of free moving window

This article shares the specific code of JavaScri...

Detailed explanation of the initialization mechanism in bash

Bash Initialization Files Interactive login shell...

Convert psd cut image to div+css format

PSD to div css web page cutting example Step 1: F...

HTML table tag tutorial (12): border style attribute FRAME

Use the FRAME property to control the style type ...

CSS animation property usage and example code (transition/transform/animation)

During development, a good user interface will al...

A brief understanding of the three uses of standard SQL update statements

1. Environment: MySQL-5.0.41-win32 Windows XP Pro...

Tomcat parses XML and creates objects through reflection

The following example code introduces the princip...

Install mysql offline using rpm under centos 6.4

Use the rpm installation package to install mysql...

Supplementary article on front-end performance optimization

Preface I looked at the previously published arti...