how to assign javascript variable value to php variable

前端 未结 8 1565
佛祖请我去吃肉
佛祖请我去吃肉 2020-11-28 15:12

I have declared a javascript variable ,

 var myJavascriptVar = 12345;

And unable to assign that value to php variable;

8条回答
  •  一个人的身影
    2020-11-28 15:54

    You should see these links:

    Assign Javascript value to PHP variable

    Passing Javascript vars to PHP

    Or you can use AJAX request or POST and GET methods to achieve this.

    Snippet below may helpful for you:

     
    
    
    Your name:

提交回复
热议问题