douke1891 2015-01-18 10:57
浏览 78

删除Jasny fileinput小部件中的更改按钮

I integrated Jasny Fileinput Widget into my existing form. When I select new file, It will display two button: Change and Remove. I think Change button is not neccessary in this case so I would like to remove this button completely. By adding style="display:none" to the element and I also try to remove this element. However, this still appear a blank spot like this: jsfiddle.

MY HTML:

<div class="fileinput fileinput-exists" data-provides="fileinput">
<div class="fileinput-new thumbnail" style="width: 200px; height: 150px;">
<img src="http://www.placehold.it/200x150/EFEFEF/AAAAAA&text=no+image" />
</div>
<div class="fileinput-preview fileinput-exists thumbnail" style="max-width: 200px; max-height: 150px;"><img src="http://www.placehold.it/200x150/EFEFEF/AAAAAA&text=no+image" /></div>
<div>
<span class="btn btn-default btn-file"><span class="fileinput-new">Select image</span><span style="display:none" class="fileinput-exists">Change</span><input type="file" name="file[]"></span>
<a href="#" class="btn btn-default fileinput-exists" data-dismiss="fileinput">Remove</a>
</div>
</div>

Any suggestions how to remove this completely please?

  • 写回答

1条回答 默认 最新

  • duanliaouu965826 2015-01-18 11:35
    关注

    It doesn't look like you'll be able to remove that button completely. As that button belongs to the file input, you can't remove it. You could however write custom styles to hide the file input button but it may hide other buttons that are associated with it.

    Sorry I couldn't help any further mate.

    评论

报告相同问题?

悬赏问题

  • ¥15 如何在scanpy上做差异基因和通路富集?
  • ¥20 关于#硬件工程#的问题,请各位专家解答!
  • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
  • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
  • ¥30 截图中的mathematics程序转换成matlab
  • ¥15 动力学代码报错,维度不匹配
  • ¥15 Power query添加列问题
  • ¥50 Kubernetes&Fission&Eleasticsearch
  • ¥15 報錯:Person is not mapped,如何解決?
  • ¥15 c++头文件不能识别CDialog