servant/servant-jquery/examples/www/api.js
2015-04-20 11:18:28 +02:00

20 lines
300 B
JavaScript

function postcounter(onSuccess, onError)
{
$.ajax(
{ url: '/counter'
, success: onSuccess
, error: onError
, type: 'POST'
});
}
function getcounter(onSuccess, onError)
{
$.ajax(
{ url: '/counter'
, success: onSuccess
, error: onError
, type: 'GET'
});
}