douliexu5623 2015-03-03 08:11
浏览 30
已采纳

在PHP中读取哈希参数

me jQuery generate url:

location.hash = "parameter1=DEF&parameter2=XYZ";
//www.example.com#parameter1=DEF&parameter2=XYZ

How to read this parameter1 and parameter2 in PHP

  • 写回答

2条回答 默认 最新

  • douhe6255 2015-03-03 08:12
    关注

    Your javascript is client-side and your PHP is server-side, so it's not possible.

    You should rethink your application or use Ajax to send data from Javascript to PHP: https://api.jquery.com/jquery.ajax/

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?