jQuery Ajax passing value on php same page

前端 未结 2 1560
别跟我提以往
别跟我提以往 2020-11-28 13:51

I am kinda confused on it, when trying to send value on the same page.

 

        
2条回答
  •  野趣味
    野趣味 (楼主)
    2020-11-28 14:34

    Here is the working code for you. To send ajax request to the same page you can keep url parameter empty, which you are already doing. If you are trying to make the script behave differently when $_POST has value then use isset as I have used below.

     
    
        
    
    
     

提交回复
热议问题