Skip to content

Instantly share code, notes, and snippets.

@udibagas
Created March 28, 2013 05:35
Show Gist options
  • Save udibagas/5260934 to your computer and use it in GitHub Desktop.
Save udibagas/5260934 to your computer and use it in GitHub Desktop.
ajax submit form dengan jquery
<!--
FORM DI SINI
-->
<div class="html-response"></div>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript">
$('form').sumbit(function() {
$.ajax({
url: 'proses.php',
type: 'post',
data: $('form').serialize(),
dataType: 'html',
success: function(r) {
$('#html-response').html(r);
}
})
return false;
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment