내 웹 사이트 중 하나에서 'Facelift 1.2'라는 자바 스크립트를 사용하고 있으며 Safari 3, 4b 및 Opera, OmniWeb 및 Firefox에서 스크립트가 작동하지만 모든 IE 버전에서는 작동하지 않습니다. 하지만 작동하는 브라우저에서도 다음과 같은 오류가 발생합니다. 해독 할 수 없습니다.자바 스크립트 : '개체 필요'오류. 나는 그것을 해독 할 수 없다. 너는 할수 있니?
Javascript로 더 많은 경험을 할 수있는시기에 어쩌면 - 내가 할 수있을 것입니다.하지만 지금은 여러분 중 일부에게 물어볼 줄 알았습니다. Firebug Console Log http://img100.imageshack.us/img100/3636/err3.png
: IE Error Pop Up http://img21.imageshack.us/img21/3651/err2.png다음 파이어 폭스 3.0.6에서 방화범 콘솔에서이다 :
다음 Interet 익스플로러 6, 7 및 8 페이지를 테스트 내가 IETester에서 얻을 오류 팝업입니다
웹 사이트 : http://www.457cc.co.nz/index.php 도움이 될 경우에 실제로 언급 된 문제를 확인하는 데 도움이됩니다.
는 I도 620에 대응 어떤 라인업 보았다되는 : "라인 (76)"이다 코드합니다 (flir.js 찍은)의 블록의 일부this.isCraptastic = (typeof document.body.style.maxHeight=='undefined');
:
// either (options Object, fstyle FLIRStyle Object) or (fstyle FLIRStyle Object)
,init: function(options, fstyle) { // or options for flir style
if(this.isFStyle(options)) { // (fstyle FLIRStyle Object)
this.defaultStyle = options;
}else { // [options Object, fstyle FLIRStyle Object]
if(typeof options != 'undefined')
this.loadOptions(options);
if(typeof fstyle == 'undefined') {
this.defaultStyle = new FLIRStyle();
}else {
if(this.isFStyle(fstyle))
this.defaultStyle = fstyle;
else
this.defaultStyle = new FLIRStyle(fstyle);
}
}
this.calcDPI();
if(this.options.findEmbededFonts)
this.discoverEmbededFonts();
this.isIE = (navigator.userAgent.toLowerCase().indexOf('msie')>-1 && navigator.userAgent.toLowerCase().indexOf('opera')<0);
this.isCraptastic = (typeof document.body.style.maxHeight=='undefined');
if(this.isIE) {
this.flirIERepObj = [];
this.flirIEHovEls = [];
this.flirIEHovStyles = [];
}
}
전체 스크립트는 내 서버로 볼 수 있습니다 : http://www.457cc.co.nz/facelift-1.2/flir.js는
는난 그냥 어디 모른다 특히 IE에만 영향을 주지만 나머지는 작동하기 때문에 오류를 찾기 시작할 수 있습니다. 어쩌면 너희들에게 생각이 있을지 모른다. 나는 그 (것)들을 듣는 것을 싶을.
읽어 주셔서 감사합니다. Jannis
추신 :
JavaScript - http://www.457cc.co.nz/index.php
Inline script thread
Error:
name: TypeError
message: Statement on line 620: Cannot convert undefined or null to Object
Backtrace:
Line 620 of linked script http://www.457cc.co.nz/facelift-1.2/flir.js
document.body.appendChild(test);
Line 70 of linked script http://www.457cc.co.nz/facelift-1.2/flir.js
this.calcDPI();
Line 2 of inline#1 script in http://www.457cc.co.nz/index.php
FLIR.init();
stacktrace: n/a; see 'opera:config#UserPrefs|Exceptions Have Stacktrace'
고맙습니다. 매력처럼 작동합니다! 어제 문서 준비 문을 포함하는 간단한 방법으로 6 시간을 낭비했다는 것을 믿을 수 없습니다. – Jannis
문제 없습니다. 모든 자바 스크립트 닌자는 한 번 "페이지로드 전에 DOM에 액세스하는 중"오류로 인해 어려움을 겪었습니다. 꽤 일반적입니다. – Triptych