<?
function cecho()
{
echo 'ура';
}
if(isset($_POST["a"])){
cecho();
exit();
}
?>
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
function myFirstFunc()
{
var aaa = $("#example_j input.first").val();
var bbb = $("#example_j input.second").val();
$.ajax({
type: "POST",
url: "http://localhost/test.php", // тут url твоей страницы
data: ({a : aaa, b : bbb}),
success: function(data){
$("#example_j span").text("Выполнено! " + data);
}
});
}
</script>
</head>
<body>
<div id="example_j">
<form onsubmit="myFirstFunc(); return false;" method="POST" action="">
<input type="text" class="first" value="erver" />
<input class="second" type="text" value="12345" />
<input type="submit" />
<span></span>
<p></p>
</form>
</div>
</body>
</html>