我需要一个
的功能默认显示图片
使用{input type="file"}
上传文件时隐藏的图片
<div id='browse-img-sh'><img src="https://cdn4.iconfinder.com/data/icons/Pretty_office_icon_part_2/64/man.png" /></div>
<input name="" type="file">
答案 0 :(得分:0)
jQuery(document).ready(function(){
jQuery('#hideshow').live('click', function(event) {
if (window.File && window.FileReader && window.FileList && window.Blob)
{
if (jQuery('#file_input')[0].files[0] != undefined) {
jQuery('#content').toggle('show');
}
}
else {
console.log("File API is not supported");
}
});
});
我认为这可以帮助你。