📜  引导配置文件图片 - 任何代码示例

📅  最后修改于: 2022-03-11 14:59:55.409000             🧑  作者: Mango

代码示例6
$("#profileImage").click(function(e) {
    $("#imageUpload").click();
});

function fasterPreview( uploader ) {
    if ( uploader.files && uploader.files[0] ){
          $('#profileImage').attr('src', 
             window.URL.createObjectURL(uploader.files[0]) );
    }
}

$("#imageUpload").change(function(){
    fasterPreview( this );
});