input上传图片后预览
<input type="file" id="expertPhoto"/> <img src="" class="img"/>
$('#expertPhoto').change(function(){ $('.img').attr('src',URL.createObjectURL($(this)[0].files[0])) })
<input type="file" id="expertPhoto"/> <img src="" class="img"/>
$('#expertPhoto').change(function(){ $('.img').attr('src',URL.createObjectURL($(this)[0].files[0])) })