<input type="file" id="fil" onChange="document.imagen.src=(this.value=='') ? 'imagenpordefecto.gif':'file:///' + this.value">