<img src="#" id="preview" /> <input type="file" id="userfiles" name="userfile" value="userfiles" class="set_file" önchange="javascript:readURL(this)" /> <script type="text/javascript"> /*$('input.set_file').click(function(){ document.getElementById("userfiles").onchange = function(evt) { alert(evt.target.id); } });*/ function readURL(input) { if (input.files && input.files[0]) { var reader = new FileReader(); reader.onload = function (e) { $('#preview') .attr('src',e.target.result) .width(192) .height(225); }; reader.readAsDataURL(input.files[0]); } } </script>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)