单击文件上传按钮时隐藏 div
Hide a div on file upload button click
我需要
的功能
默认显示图片的位置
当文件上传时使用 {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">
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");
}
});
});
我想这对你有帮助。
我需要
的功能默认显示图片的位置
当文件上传时使用 {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">
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");
}
});
});
我想这对你有帮助。