0
我想運行一個pushState
,它工作正常,但當我通過iframe元素加載頁面時,它拒絕工作。這是我的代碼看起來像javascript history.pushState不適用於iframe
$('a[href]').click(function){
newHref = $(this).attr('href');
history.pushState('', '', newHref);
})
但它不工作,請任何人有一個想法如何實現這一目標?