누군가는 왜 window.location이 ie8 (어쩌면 ie7)에서 정의되지 않았지만 document.location으로 작동하는지 알고 있습니다?window.location은 ie8에서 정의되지 않았습니다
다른 프로젝트의 다른 파일에 비슷한 코드가 있지만 IE에 문제가없는 이유를 찾을 수 없습니다.
'window.location.hash가 null이거나 jquery 1.6.4 line 2의 객체가 아닙니다.'라는 이상한 오류가 발생합니다. 1.5.1도 시도했지만 같은 오류가 발생했습니다.
헤더 :
<html lang="">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<link rel="stylesheet" href="assets/css/style.css">
<script src="assets/js/jquery.1.6.4.min.js"></script>
<!--[if lt IE 9]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<script src="assets/js/jquery.easing.1.3.js"></script>
<script src="assets/js/jquery.ba-hashchange.min.js"></script>
<script src="assets/js/script.js"></script>
</head>
JS 부분 :
이 IE 9에서 작동하지 않습니다하지만 프로젝트에서 뭔가,window.location
를 오버라이드 (override) 할 수있다
if(window.onhashchange)
{
window.onhashchange = function()
{
hashChanged(window.location.hash);
}
}
else
{
var storedHash = window.location.hash;
window.setInterval(function()
{
if(window.location.hash != storedHash)
{
storedHash = window.location.hash;
hashChanged(storedHash);
}
}, 100);
}
''이 누락 되었습니까? 아니면 붙여 넣지 않았습니까? – canon
IE에서 * 문제가 있습니까? 아니면 다른 브라우저들? 'location'이라는 이름의 변수가 있습니까? – user113716
바로 IE입니다. 이런 식으로, @ Ӫ _._ Ӫ –