Title
.div1{
display: none;
width: 200px;
height: 200px;
background-color: #56b4ef;
}
$(document).ready(function () {
$('.get').click(function () {
$.get();
});
$('.post').click(function () {
$.post('http://47.107.100.125:8080/api/home/getAgreement',{name:'dads',skill:''});
});
$('.ajax').click(function () {
$.ajax({
url:'http://47.107.100.125:8080/api/home/getAgreement',
type:'get',
data:{
'name':'ajax',
'id':12
},
success:function (data) {
console.log(data)
},
error:function () {
console.log('请求失败')
}
});
$(document).ajaxStart(function () {
$('.div1').show(2000);
});
$(document).ajaxComplete(function () {
$('.div1').hide(2000);
})
});
})
一键复制
编辑
Web IDE
原始数据
按行查看
历史