$.ajax({ url: 'page.php', type: 'post', data: 'valor=2', success: function(data){ /* code java*/ } });