<script>
function readURL(input) {
if (input.files && input.files[0]) {
var reader = new FileReader();
reader.onload = function (e) {
$('#blah')
.attr('src', e.target.result)
.width(150)
.height(200);
};
reader.readAsDataURL(input.files[0]);
}
}
</script>
<input type='file' name="tutor_photo" onchange="readURL(this);" />
<img id="blah" src="#" alt="your image" />
function readURL(input) {
if (input.files && input.files[0]) {
var reader = new FileReader();
reader.onload = function (e) {
$('#blah')
.attr('src', e.target.result)
.width(150)
.height(200);
};
reader.readAsDataURL(input.files[0]);
}
}
</script>
<input type='file' name="tutor_photo" onchange="readURL(this);" />
<img id="blah" src="#" alt="your image" />
0 comments:
Post a Comment