$.get("URL",function(data){
$.ecch(date,function(i,item){
循环显示
})
});
<pre style="font-family: 'Source Code Pro'; font-size: 10.5pt; background-color: rgb(255, 255, 255);"><pre name="code" class="javascript">var data = {
'ip': Ip,
'volumeId': volumeId,
'size': volumeSize,
'activeTime': activeTime
}
//几种请求类型,添加:POST,删除:DELETE 查询:GET 更新 :PUT
$.ajax({
url: '/snapshot/addSnapshot',
type: 'POST',
contentType: 'application/json',
data: JSON.stringify(data),
success: function () {
alert("success");
location.reload();
},
error: function (data) {
alert("添加失败,原因:" + data);
}
});