вот простейший пример:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>123</title>
</head>
<body>
<form action="zakaz.php" method="post">
<textarea id="extra_message" name="extra_message"></textarea>
<button id="registerButton" type="submit">submit</button>
</form>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.10.2.min.js"></script>
<script type="text/javascript">
$('form').submit(function()
{
$.post('zakaz.php', function(data)
{
console.log(data);
});
return false;
});
</script>
</body>
</html>
|