提交图像时删除浏览按钮

时间:2014-12-06 16:44:53

标签: javascript jquery html css

我想从图片中删除浏览按钮,如果我只保留个人资料图片的图像,那就更专业了,这样当用户点击图片时,它会打开选​​择文件窗口......我设法使用以下代码执行此操作:

<label><img src="images/profile-picture.png"><input type="file" name="pic" id="pic" accept="image/*"></label>

我知道如何删除烦人的按钮及其旁边的文字?

This is my web interface

1 个答案:

答案 0 :(得分:1)

编辑:您只需隐藏输入设置,将其显示属性设置为无:

&#13;
&#13;
<label>
  <img src="http://www.insidefacebook.com/wp-content/uploads/2013/01/profile-150x150.png" id="profile-pic">
  <input type="file" name="pic" id="pic" accept="image/*" style="display: none;">
</label>
&#13;
&#13;
&#13;