当前位置:网站首页>Download files and preview pictures
Download files and preview pictures
2022-07-02 13:16:00 【1900's 88 keys】
Download files
a The label specifies download Property will download the link to jump , The premise is homology
<h2> Front-end blob object --- Download files && Preview of the picture </h2>
<br>
<a id="btn"> Download the file </a>
<script> var str = ` <div> <p> Download files </> </div> `; var blob = new Blob([str], {
type: 'text/html' }); btn.onclick = function (e) {
this.setAttribute('download', '123.html'); this.href = URL.createObjectURL(blob); } </script>
Preview of the picture
<input type="file" id="input1">
<input type="file" id="input2">
<script> // Sync input1.onchange = function (e) {
var file = e.target.files[0]; var img = new Image(); img.src = URL.createObjectURL(file) document.body.appendChild(img) } // asynchronous input2.onchange = function (e) {
var file = e.target.files[0]; var img = new Image(); var fileRead = new FileReader(); document.body.appendChild(img) fileRead.onload = function () {
img.src = fileRead.result } fileRead.readAsDataURL(file) } </script>
边栏推荐
- leetcode621. 任务调度器
- Structured data, semi-structured data and unstructured data
- Hundreds of web page special effects can be used. Don't you come and have a look?
- Operation tutorial: how does easydss convert MP4 on demand files into RTSP video streams?
- 解答:EasyDSS视频点播时音频是否可以设置为默认开启?
- 机器学习基础(二)——训练集和测试集的划分
- [200 opencv routines] 100 Adaptive local noise reduction filter
- 文件的下载与图片的预览
- Independent and controllable 3D cloud CAD: crowncad enables innovative design of enterprises
- mac(macos Monterey12.2 m1) 个人使用php开发
猜你喜欢

Tencent three sides: in the process of writing files, the process crashes, and will the file data be lost?
![[200 opencv routines] 100 Adaptive local noise reduction filter](/img/89/9e9b667dd28cb25af005b6028ef26c.jpg)
[200 opencv routines] 100 Adaptive local noise reduction filter

三面阿里,有惊无险成功拿到offer定级P7,只能说是真的难

Crowncad (crown CAD), the first fully independent 3D CAD platform based on Cloud Architecture in China

Js2day (also i++ and ++i, if statements, ternary operators, switch, while statements, for loop statements)

难忘阿里,4面技术5面HR附加笔试面,走的真艰难真心酸

Unity SKFramework框架(二十)、VFX Lab 特效库

Fully autonomous and controllable 3D cloud CAD: crowncad's convenient command search can quickly locate the specific location of the required command.
![[opencv learning] [moving object detection]](/img/2e/9b437b7fe22f1d57334529eda68e37.jpg)
[opencv learning] [moving object detection]
![[opencv learning] [common image convolution kernel]](/img/15/d1e8b8aa3c613755e64edb8c9a0f54.jpg)
[opencv learning] [common image convolution kernel]
随机推荐
OLED screen driver based on stm32
JS generates 4-digit verification code
中文姓名提取(玩具代码——准头太小,权当玩闹)
How can attribute mapping of entity classes be without it?
Unity SKFramework框架(十六)、Package Manager 開發工具包管理器
Rust language document Lite (Part 1) - cargo, output, basic syntax, data type, ownership, structure, enumeration and pattern matching
Answer: can the audio be set to on by default during easydss video on demand?
记忆函数的性能优化
Fully autonomous and controllable 3D cloud CAD: crowncad's convenient command search can quickly locate the specific location of the required command.
Japan bet on national luck: Web3.0, anyway, is not the first time to fail!
诚邀青年创作者,一起在元宇宙里与投资人、创业者交流人生如何做选择……...
2022零代码/低代码开发白皮书【伙伴云出品】附下载
自主可控三维云CAD:CrownCAD赋能企业创新设计
挥发性有机物TVOC、VOC、VOCS气体检测+解决方案
Record idea shortcut keys
(7) Web security | penetration testing | how does network security determine whether CND exists, and how to bypass CND to find the real IP
上海交大教授:何援军——包围盒(包容体/包围盒子)
嵌入式软件开发
nohup命令
[opencv learning] [Canny edge detection]