How to get data from one php page using ajax and pass it to another php page using ajax

后端 未结 4 530
野性不改
野性不改 2021-01-22 08:45

I am trying to get data from one php page and pass it to another page using Ajax.

JS :

$.ajax({
      url: \"action.php\",
      succes         


        
4条回答
  •  面向向阳花
    2021-01-22 09:00

    For example,

    Test
    
    
    
    

    action.js

    $('.dataClass').click(function(){
        var value=$(this).attr('data-value');
        $.ajax({url:"Ajax_SomePage.php?value="+value,cache:false,success:function(result){
            alert("success");
        }});
    }); 
    

    Ajax_SomePage.php

    
    

提交回复
热议问题