7
history.pushState()が動作する必要があるため、Internet Explorerでhistory.jsを動作させようとしています。私はGitHub(https://github.com/browserstate/History.js/)の説明を読んでそれを実装しようとしましたが、何の成功もありませんでした。 は、ここで私はInternet ExplorerでHistory.jsが動作しない
<!DOCTYPE html>
<html>
<head>
<!-- jQuery -->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
<!-- History.js -->
<script defer src="http://balupton.github.com/history.js/scripts/bundled/html4+html5/jquery.history.js"></script>
<script type="text/javascript">
function addHistory(){
// Prepare
var History = window.History; // Note: We are using a capital H instead of a lower h
// Change our States
History.pushState(null, null, "mylink.html");
}
</script>
</head>
<body>
<a href="mylink.html">My Link</a>
<a href="otherlink.html">Other Link</a>
<button onclick="addHistory()" type="button">Add History</button>
</body>
ない私が間違ってやっているのかわから持っているものだが、それは間違いなく、IE8またはIE9で働いていません。それはFirefoxで動作しますが、Firefoxが実際にはhistory.pushstateをサポートしているためかもしれません。どんな助けもありがとう
を参照してください役に立てば幸いそれはどこか他の作業であるか、あなただけのIEを試してみましたか? – Tyrsius
IEの各バージョンまたはどのバージョンを試しましたか? –
私はIE8とIE9を試してみました。残して申し訳ありません。 Firefoxでは動作しますが、デフォルトではhistory.pushstateをサポートしている可能性があります。 – Wilcoholic