/ Published in: jQuery
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
$(function(){ $('#myajaxbutton').click(function(){ $.ajax({ url: '/index/dosomething', type: 'POST', data { givemethis : 'IT WORKS!' }, dataType: 'json', success: function(msg){ alert(msg.val); } }); }); });