/ Published in: jQuery
URL: http://api.jquery.com/jQuery.ajax/
form method / url is pulled from the form dataType is set to json but can include the following: xml, json, script, or html
Expand |
Embed | Plain Text
$.ajax({ type: $('form').attr('method'), url: $('form').attr('action'), data: { keyword: keyword }, dataType: 'json', complete: function(){ //alert('complete'); }, error: function(){ //alert('error'); }, success: function(data){ //alert('success'); } });
You need to login to post a comment.
