开发者

How to send data via Javascript - Jquery

How 开发者_如何学JAVAto send data via Javascript - Jquery


If you want to send some data to a server side script your could use AJAX. jQuery has great support through $.ajax(), $.post(), $.get(), $.getJSON():

$.ajax({
    url: '/script',
    data: { key1: 'value 1', key2: 'value 2' },
    success: function(result) {
        alert('data successfully sent');
    }
});


$.post() or $.send() www.jquery.com


$.ajax({
  url: url_page, 
  data: ({id: 1, data: 1212}),
  dataType: 'json'
});
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜