📜  jquery post - Javascript代码示例

📅  最后修改于: 2022-03-11 15:03:48.682000             🧑  作者: Mango

代码示例6
$(function(){
    $('#myForm').on('submit', function(e){
      e.preventDefault();
      $.post('http://www.somewhere.com/path/to/post', 
         $('#myForm').serialize(), 
         function(data, status, xhr){
           // do something here with response;
         });
    });
});