javascript variable into php

前端 未结 3 589
生来不讨喜
生来不讨喜 2020-12-07 04:54

I have a php function, in this function I have a javascript which get the value of my element from parent window. My problem now is, how can I pass this value into php varia

3条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-07 06:00

    The PHP print() language construct always returns 1.

    PHP executes on the server side. JavaScript executes on the client side. You cannot mix them directly. The best you could do would be to have JavaScript make an AJAX call to a PHP script on the server.

提交回复
热议问题