Image Preview By Javascript

<script src=”” type=”text/javascript”></script>
var blank=””;
function readURL(input) {
if (input.files && input.files[0]) {
var reader = new FileReader();

reader.onload = function (e) {

else {
var img = input.value;
$(document).ready(function() {
$(“#x”).click(function() {
<input name=”pic” type=”file” id=”pic” class=”textarea” onchange=”readURL(this)”;>
<img src=”” id=”img_prev” />

Similar Posts

One Comment

  1. Java script is shortly called JS…JS is a Dynamic computer programming language. Using JS, We can develop more dynamic web pages. Your coding is for Preview the image which quite short and effective.

Leave a Reply

Your email address will not be published. Required fields are marked *