how to use jquery ajax array post json?

后端 未结 3 1717
走了就别回头了
走了就别回头了 2021-01-26 17:59

i want to send array in ajax json post ,but some code are error.how to fig this code?

HTML

 
3条回答
  •  孤街浪徒
    2021-01-26 18:13

    Bind an event handler to the "click" JavaScript event, or trigger that event on an element.

    $( "#save-menu" ).click(function() {
       //Handler for .click() called. 
       $.post('menu/order',{...});
    });
    
    $( "#calculator" ).click(function() {
       //Handler for .click() called. 
       $.post('menu/calculator',{...});
    });
    

提交回复
热议问题