html - How to show/edit URL in this approach using jquery -
this form it's working.
<form id="form1" runat="server"> <input type='file' id="inputfile" /> <img id="image_upload_preview" src="http://placehold.it/100x100" alt="your image" /> </form>
this jquery , working:
function readurl(input) { if (input.files && input.files[0]) { var reader = new filereader(); reader.onload = function (e) { $('#image_upload_preview').attr('src', e.target.result); } reader.readasdataurl(input.files[0]); } } $("#inputfile").change(function () { readurl(this); });
i want happen url shows below , can edit(so uploaders can edit url) like:
check image: http://i.stack.imgur.com/tsobg.jpg
jsfiddle: http://jsfiddle.net/lesson8/9nexg/light/
Comments
Post a Comment