开发者

How to send data via Javascript - Jquery

开发者 https://www.devze.com 2023-02-02 14:12 出处:网络
How 开发者_如何学JAVAto send data via Javascript - JqueryIf you want to send some data to a server side script your could use AJAX. jQuery has great support through $.ajax(), $.post(), $.get(), $.getJ

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

精彩评论

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