Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Image preview using js

<input type="file" id="frontsideimg" name="frontsideimg" style="display:none" accept="image/*" onchange="showfront(event);">
                                                          
<script>

function showfront(event){
	if(event.target.files.length > 0){
		var src = URL.createObjectURL(event.target.files[0]);
		var preview = document.getElementById("frontsideview");
		preview.src = src;
		$('#frontsideview').show();
		frontsideUploadid();
	}
}
</script>
 
PREVIOUS NEXT
Tagged: #Image #preview #js
ADD COMMENT
Topic
Name
3+9 =