使用haslink(#testhash)在Safari上不起作用。我真的無法找到問題。 這裏是下面的代碼我提供以下Hashlink在Safari中不起作用
<a href="?page_id=112#testhash">Click here to go to Hash</a>
<div style="height:500px"> </div>
<div id="testhash"></div>
<div>............Test Data............</div>
當我點擊鏈接,它竟能在Safari上正確的地方,但它是在谷歌Chrome,火狐Mozila和IE9正常工作。在Safari中,URL重寫後鏈接重定向到http://example.com/
而不是http://example.com/#testhash
。有趣的是,當我直接將鏈接http://example.com/#testhash
放在Safari的地址欄上時,它工作正常,但點擊它的時間不起作用,而且在我寫作http://example.com/?page_id=112#testhash
時,它給出了問題。
[這個答案](http://stackoverflow.com/questions/3020456/safari-anchors-on-links-not-working)可能會有所幫助。 – neo108
不,它也沒有幫助。 – Soumya