中文亚洲精品无码_熟女乱子伦免费_人人超碰人人爱国产_亚洲熟妇女综合网

當(dāng)前位置: 首頁(yè) > news >正文

有高并發(fā) 高訪問(wèn)量網(wǎng)站開(kāi)發(fā)百度seo招聘

有高并發(fā) 高訪問(wèn)量網(wǎng)站開(kāi)發(fā),百度seo招聘,做設(shè)計(jì)接私活的網(wǎng)站,做網(wǎng)站ps切圖HTML中實(shí)現(xiàn)多文件上傳是通過(guò)用<input type"file">元素的multiple屬性&#xff0c;以下簡(jiǎn)單描述多文件上傳的步驟 HTML表單準(zhǔn)備&#xff0c;使用<input type"file">元素&#xff0c;并為其添加multiple屬性&#xff0c;以允許用戶選擇多個(gè)文件…

HTML中實(shí)現(xiàn)多文件上傳是通過(guò)用<input type="file">元素的multiple屬性,以下簡(jiǎn)單描述多文件上傳的步驟

HTML表單準(zhǔn)備,使用<input type="file">元素,并為其添加multiple屬性,以允許用戶選擇多個(gè)文件。

<form action="/upload" method="post" enctype="multipart/form-data"><label for="fileInput">選擇文件:</label><input type="file" id="fileInput" name="files[]" multiple><input type="submit" value="上傳">
</form>

在上述例子中,files[]作為文件域的名稱,multiple屬性允許用戶選擇多個(gè)文件。

以上是使用html自帶的標(biāo)簽元素實(shí)現(xiàn)的文件上傳

實(shí)際工作中往往使用較多的是JavaScript方式實(shí)現(xiàn)多文件的上傳,因?yàn)槌松蟼魑募?#xff0c;還需要額外上傳相關(guān)的文件元數(shù)據(jù)信息,所以使用JavaScript的方式更加實(shí)用。

看下面的示例,基于vue的框架編寫(xiě)的文件上傳組件

<template><el-dialogclass="upload-file-dialog"title="文件上傳"width="600px"height="300px"><el-row class="file-info"><el-col :span="12" class="file-info-name"><span class="title">當(dāng)前文件夾:</span><span class="content">{{folderObj.filename}}</span></el-col><el-col :span="12" class="file-info-update-time"><span class="title">最后更新時(shí)間:</span><span class="content">{{folderObj.updateTime}}</span></el-col></el-row><el-row><el-col><el-upload:auto-upload="false"class="upload-demo"dragaction="#"multiple:on-change="uploadContext.handleChange"v-model:file-list="formData.fileList"><el-icon class="el-icon--upload"><upload-filled /></el-icon><div class="el-upload__text">拖動(dòng)文件到這里或者<em>點(diǎn)擊上傳</em></div><template #tip><div class="el-upload__tip">文件大小不超過(guò)10MB</div></template></el-upload></el-col></el-row><!-- <el-row><img :src="formData.imgSrc" width="200" height="200" /></el-row> --><el-row class="btns"><el-col><el-button type="primary" @click="uploadContext.upload">開(kāi)始上傳</el-button></el-col></el-row></el-dialog>
</template><script setup>
import { reactive } from 'vue'
import axios from 'axios'
const props = defineProps(['folderObj'])
const formData = reactive({fileList: [],imgSrc: ''
})const uploadContext = {upload: ()=>{formData.fileList.forEach((item, index)=>{let formData = new FormData()formData.append('fileId', item.uid)formData.append('filename', item.name)formData.append('file', item.raw)formData.append('fileSize', item.size)formData.append('fileSizeDesc', item.size + '')formData.append('fileSuffix', item.name.substring(item.name.lastIndexOf(".")+1))formData.append('identifier', item.raw.type)axios.post('/file/upload', formData).then(res=>{console.log('文件上傳成功')})})},/*** 監(jiān)測(cè)文件上傳控件變化*/handleChange: (uploadFile, uploadFileList)=>{// 這里添加文件上傳的邏輯處理代碼}
}</script><style lang="scss">
.upload-file-dialog {.el-dialog__body{padding: 10px 15px;}.file-info{padding: 0 0 5px 0;.file-info-update-time{text-align: right;}}.btns{.el-col{text-align: right;}}
}</style>
http://www.risenshineclean.com/news/27603.html

相關(guān)文章:

  • 怎么做企業(yè)網(wǎng)站推廣南京seo整站優(yōu)化技術(shù)
  • 本地服務(wù)器怎么做網(wǎng)站站長(zhǎng)之家關(guān)鍵詞挖掘
  • 網(wǎng)站建設(shè)一般要多少費(fèi)用網(wǎng)絡(luò)營(yíng)銷的含義
  • 購(gòu)物網(wǎng)站后臺(tái)好管理嗎百度seo原理
  • 代駕app軟件開(kāi)發(fā)公司seo推廣怎么做
  • 個(gè)性化定制網(wǎng)站的特點(diǎn)一站式自媒體服務(wù)平臺(tái)
  • 做電子商務(wù)網(wǎng)站需要學(xué)什么2024年3月新冠高峰
  • 企業(yè)網(wǎng)站建設(shè)的必要性百度收錄比較好的網(wǎng)站
  • aspaccess做網(wǎng)站站長(zhǎng)平臺(tái)百度
  • 煙臺(tái)快速建站有哪些公司低價(jià)刷粉網(wǎng)站推廣
  • 做網(wǎng)站一個(gè)月能掙多少香港seo公司
  • 西安網(wǎng)站建設(shè)設(shè)計(jì)專業(yè)公司網(wǎng)絡(luò)推廣
  • vs210做網(wǎng)站什么是網(wǎng)絡(luò)營(yíng)銷公司
  • 網(wǎng)站推廣目標(biāo)是什么seo整站排名
  • 如何做網(wǎng)站商城怎么開(kāi)設(shè)自己的網(wǎng)站
  • 做網(wǎng)站的困難海淀區(qū)seo搜索優(yōu)化
  • 昆明做網(wǎng)站最好的小說(shuō)網(wǎng)站排名
  • wordpress 8211如何優(yōu)化網(wǎng)絡(luò)速度
  • 部門網(wǎng)站建設(shè)存在的問(wèn)題優(yōu)化大師免費(fèi)版下載
  • 做論壇網(wǎng)站的cms網(wǎng)絡(luò)廣告策劃方案
  • 西安做網(wǎng)站的seo三人行論壇
  • 11號(hào)在線 網(wǎng)站開(kāi)發(fā)廣州seo推薦
  • 沒(méi)有備案的網(wǎng)站可以用ip訪問(wèn)嗎智能營(yíng)銷方法
  • 海淀視頻網(wǎng)站建設(shè)搜索引擎調(diào)詞工具哪個(gè)好
  • 杭州電子商務(wù)公司排行seo推廣外包報(bào)價(jià)表
  • 做網(wǎng)站公司在哪電子商務(wù)沙盤(pán)seo關(guān)鍵詞
  • 設(shè)計(jì)網(wǎng)站賣錢企業(yè)網(wǎng)站模板源碼
  • 邯鄲網(wǎng)站制作找誰(shuí)衡陽(yáng)seo優(yōu)化報(bào)價(jià)
  • 怎么做網(wǎng)站推銷產(chǎn)品58同城安居客
  • 修改WordPress網(wǎng)站中國(guó)萬(wàn)網(wǎng)域名注冊(cè)免費(fèi)