由于我想确定链接中是否有 #,并且您只能在 Javascript 中执行此操作,因此我想将 JS 变量传输到 PHP。
所以如果我有:
if(location.hash){
var hash = location.hash;
hash var 需要变成 php $hash var..
如果不可能的话,我也尝试过,在帖子中发送变量,
$.post('photo.php?mode=grab', { hash: hash }, function(result) {
// ..but then i got stuck, how should i transfer to php var from here?