项目案例:
复制代码 代码如下:
function connection(){
$.ajax({
type:"GET",
url:"/api2/session/event?",
data:{
"uid":obj.uid,
"sessionID":"cool"
},
success:function(serverData){
connection();
},
error:function(XMLHttpRequest, textStatus, errorThrown){
connection();
}
});
}