我無法確定在一個字符串中放置php變量的語法。代碼如下:.attr中的PHP變量字符串
if(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) {
jQuery('#pinfo').attr('href','mailto:[email protected]?subject=' . get_the_title());
jQuery('#pinfo').attr('class','pullup');
};
get_the_title()
沒有顯示和代碼似乎與我目前的語法突破。
你應該設置變量,然後你可以在html中使用它。你可以發佈get_the_title()的代碼嗎? – bksi
get_the_title()是一個標準的wordpress函數 - http://codex.wordpress.org/Function_Reference/get_the_title –
我沒有看到標籤wordpress,我無法讀取頭腦對不起。 – bksi