Send values to $_GET using jQuery

前端 未结 4 713
忘掉有多难
忘掉有多难 2021-01-28 13:30

I\'m using a PHP script that is waiting for two values through $_GET.

I\'m trying to pass those 2 values using jQuery and that\'s where I\'m not too good at.

Her

4条回答
  •  不要未来只要你来
    2021-01-28 14:00

    function xrate(id,rating){  
    
       $.ajax({
          url: "ajax_xrate.php",
          data: {
              id: id,
              rate:rating
          },
          type: "GET",
          success: function(){
             alert('Bravo!');
          }
       });
    
    }
    

提交回复
热议问题