• Welcome to the world's largest Chinese hacker forum

    Welcome to the world's largest Chinese hacker forum, our forum registration is open! You can now register for technical communication with us, this is a free and open to the world of the BBS, we founded the purpose for the study of network security, please don't release business of black/grey, or on the BBS posts, to seek help hacker if violations, we will permanently frozen your IP and account, thank you for your cooperation. Hacker attack and defense cracking or network Security

    business please click here: Creation Security  From CNHACKTEAM

Recommended Posts

!声明文档类型

html lang='en '

meta charset='UTF-8 '

meta http-equiv=' X-UA-Compatible ' content=' IE=edge '

meta name=' viewport ' content=' width=device-width,initial-scale=1.0 '

标题文档/标题

脚本src=' js/jquery-3。6 .0 .js '/脚本

/头

身体

输入类型='文件id='文件1 '

按钮id='btnUpload '上传文件/按钮

英国铁路公司

img src=' img/loading。gif ' alt=' ' style=' display : none;id='正在加载'

脚本

$(function () {

//监听到埃阿斯请求被发起了

$(文档)。ajaxStart(function () {

$('#loading ').显示()

})

//监听到埃阿斯完成的事件

$(文档)。ajaxStop(function () {

$('#loading ').隐藏()

})

$('#btnUpload ').on('click ',function () {

//核心代码

let files=$('#file1')[0].文件

if (files.length=0) {

返回警报('请选择文件后再上传!')

}

设fd=新表单数据()

fd.append('头像,文件[0])

//发起框架的埃阿斯请求,上传文件

$.ajax({

方法: '发布:

网址: ' http://www。刘龙斌。' top :3006/API/上传/头像',

数据: fd,

//重要

过程数据:错误,

contentType: false,

成功:函数(资源){

控制台。日志(分辨率);

}

})

})

})

/脚本

/body

/html

Link to comment
Share on other sites