How to pass value JavaScript variable to PHP?

后端 未结 4 1159
借酒劲吻你
借酒劲吻你 2021-01-22 13:38

Passing value JavaScript variable to PHP.

Example

JavaScript

Var ffffd=\'aaaa\'

PHP

<         


        
4条回答
  •  [愿得一人]
    2021-01-22 14:24

    In JS:

     $.post('ajax.php',{'ffffdd' : ffffdd}, function(data){
     });
    

    In PHP

     if(isset($_POST['ffffdd'])) $ffffdd = $_POST['ffffdd'];
    

提交回复
热议问题