Home > Web Front-end > HTML Tutorial > html上传图片之前在网页预览实现_html/css_WEB-ITnose

html上传图片之前在网页预览实现_html/css_WEB-ITnose

WBOY
Release: 2016-06-21 08:54:19
Original
987 people have browsed it

```<!DOCTYPE html><html><head><meta http-equiv="content-type" content="text/html; charset=UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"><title>preview image</title></head><body><form>    <input type="file"></form><script src="/static/js/jquery.min.js"></script><script>    $('input[type="file"]').change(function(e){        reader = new FileReader();        reader.readAsDataURL(e.target.files[0]);        reader.onload = function(){            $('body').append($('<img  / alt="html上传图片之前在网页预览实现_html/css_WEB-ITnose" >', {src: reader.result}));        };    });</script></body></html>```
Copy after login

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template