当前位置:网站首页>Input displays the currently selected picture
Input displays the currently selected picture
2022-07-04 05:37:00 【A bowl of noodles from the landlady】
1.jsp Code
<div class="lf salebd">
<a href="#">
<img src="images/ad20.jpg" id="img" width="100" height="100"/></a></div>2.js Code
$(function () {
$("#file").change(function () {
if (this.files.length) {
let file = this.files[0];
let reader = new FileReader();
// newly build FileReader object
reader.onload = function () {
// When FileReader When reading a file , The read results will be placed in FileReader.result Properties of the
document.querySelector('#img').src = this.result;
document.querySelector('#text').innerHTML = this.result;
};
// Set how to read files , Here we use base64 The way
reader.readAsDataURL(file);
}
})
})3. effect

边栏推荐
- [paper summary] zero shot semantic segmentation
- Descriptive analysis of data distribution characteristics (data exploration)
- [wechat applet] template and configuration (wxml, wxss, global and page configuration, network data request)
- C language simple student management system (including source code)
- flink1.13 sql基础语法(一)DDL、DML
- Thread pool: use thread pool to optimize query speed
- Penetration tool - sqlmap
- BUU-Real-[PHP]XXE
- VB.net 简单的处理图片,黑白(类库——7)
- BUU-Crypto-Cipher
猜你喜欢

Letter meaning and parameter abbreviation of optical module Daquan

C # character similarity comparison general class

Trie number dictionary tree

PostgreSQL has officially surpassed mysql. Is this guy too strong!

Penetration tool - sqlmap

Flask
![[interested reading] advantageous filtering modeling on long term user behavior sequences for click through rate pre](/img/3e/b5df691ca1790469eb1b4e8ea5b4c0.png)
[interested reading] advantageous filtering modeling on long term user behavior sequences for click through rate pre
![[QT] timer](/img/df/5db6af851ef19f33fd7e7a7ed46586.png)
[QT] timer
![[paper summary] zero shot semantic segmentation](/img/78/ee64118d86a7e43ec4d1cb97191fbe.jpg)
[paper summary] zero shot semantic segmentation
![BUU-Crypto-[GXYCTF2019]CheckIn](/img/b8/ad6c05977f6943f30e9975acb6eb6e.jpg)
BUU-Crypto-[GXYCTF2019]CheckIn
随机推荐
光模块字母含义及参数简称大全
2022年T电梯修理操作证考试题库及模拟考试
What are the reasons for the frequent high CPU of ECS?
Just do it with your hands 7 - * project construction details 2 - hook configuration
【雕爷学编程】Arduino动手做(105)---压电陶瓷振动模块
LM小型可编程控制器软件(基于CoDeSys)笔记二十二:错误4268/4052
[matlab] matlab simulation modulation system - VSB system
【兴趣阅读】Adversarial Filtering Modeling on Long-term User Behavior Sequences for Click-Through Rate Pre
[wechat applet] template and configuration (wxml, wxss, global and page configuration, network data request)
Canoe panel learning video
Analysis of classical pointer and array written test questions in C language
Letter meaning and parameter abbreviation of optical module Daquan
[matlab] matlab simulates digital baseband transmission system eye diagram of bipolar baseband signal (cosine roll off forming pulse)
Unity is connected to the weather system
Appearance of LabVIEW error dialog box
Zhanrui tankbang | jointly build, cooperate and win-win zhanrui core ecology
BUU-Crypto-[GXYCTF2019]CheckIn
Flutter ‘/usr/lib/libswiftCore. dylib‘ (no such file)
十二. golang其他
724. Find the central subscript of the array