如何使用jQuery将值更改为类型文件的输入字段 [英] How to change value to an input field of type file using jquery
本文介绍了如何使用jQuery将值更改为类型文件的输入字段的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个类型为file的输入字段,我想使用jquery更改其值.如何做到这一点,请帮助我.以下是我的html标签.
Hi I have an input field of type file and i want to change its value using jquery. How can in do that, please help me.Below is my html tag for same.
<input id="kb_file" type="file" class="file" name="multipartFile" contenteditable='false' style="display:none;"/>
推荐答案
出于明显的安全原因,您不能弄乱<input type="file" />
的value
.
You cannot mess with the value
of a <input type="file" />
for obvious security reasons.
这篇关于如何使用jQuery将值更改为类型文件的输入字段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文