FileLoad 直接显示到img标签中 实现预览效果

 οnchange= "document.getElementById('imagePro').setAttribute('src',this.value);"/>
 

 

貌似document.getElementById( 'imagePro ').src 有时候因为浏览器的原因会不行。

为了兼容各种浏览器。最好写成:
document.getElementById('').setAttribute('src',this.value);

 

 

你可能感兴趣的:(ASP.NET学习笔记)