http://www.mikage.to/jquery/jquery_history.html에서 jquery 기록 플러그인을 사용하고 있습니다.jquery 플러그인 기록이 IE8에서 작동하지 않습니다.
IE8에서 작동하도록 플러그인을 가져올 수 없습니다. Firefox에서는 예상대로 작동합니다. IE8은 플러그인 작성자 사이트의 샘플에서 작동합니다.
내 사이트에는 3 개의 링크가 있습니다. 나는 처음부터 1 ~ 3 번 항목을 클릭한다. 항목 3이 표시되면 뒤로 버튼을 누르고 URL http://localhost:5000/de/Playground/HistoryTest#link2에 도달합니다. 올바른 항목이 표시됩니다.
브라우저의 앞으로 단추가 표시되지 않지만 표시되어야합니다.
그런 다음 다시 뒤로 버튼을 누르면,하지만 난 항목 1에 도착 해달라고 : 내가 뭔가 잘못하고있는 중이 야 경우 대신 나는 3누구나가 알고있는 항목에 도착?
다음은 스크립트입니다. 나는
<script type="text/javascript" >
function callbackHistory(hash) {
if (hash != '') {
if ($.browser.msie) {
// jquery's $.load() function does't work when hash include special characters like aao.
hash = encodeURIComponent(hash);
}
//alert(hash);
$.ajax({
type: "GET",
url: "/de/Playground/HistoryDetail",
data: {
DataKey: hash
},
success: function(htmlSource) {
$("#ajaxContainer").html(htmlSource);
}
});
}
}
$(document).ready(function() {
$.history.init(callbackHistory);
$("a").click(function() {
$.history.load(this.href.replace(/^.*#/, ''));
return false;
});
});
</script>
HMTL
<a href="#link1" rel="history" >link1 </a>
<a href="#link2" rel="history" >link2 </a>
<a href="#link3" rel="history" >link3 </a>
<div id="ajaxContainer" >
</div>
[서버 부분 만 해시를 inlcudes하는 HTML 코드 조각을 렌더링을 사용합니다.
<h3>
<%= hash >
</h3>