|
<head>
<script src="jquery-2.0.3.min.js" type="text/javascript"></script>
<script type="text/javascript">
function ma_methode() {
// do the AJAX post
$.post($("#ma_form").attr("action"), $("#ma_form").serialize());
}
</script>
</head>
<!-- le return false permet d'annuler le chargement de la page ma_page.php lors du submit -->
<form id="ma_form" action="ma_page.php" method="post" onSubmit="ma_methode(); return false;">
Search: <input type="text" name="search">
<input type="submit" name="submit">
</form>
|