2012-03-05 4 views
0

이 페이지는 Safari에서 일부 문제가 있지만 Firefox에는 전혀 영향을주지 않습니다.Firefox에서 JavaScript가 실행되지 않는 이유

document.getElementById("todae").innerText = "is " + weekday[myTodae.getDay()]; 
document.getElementById("myTitle").innerText = weekday[myTodae.getDay()] + " es " + weekday[myTodae.getDay()] +" | "+ weekday[myTodae.getDay()] + " go! "; 

파이어 폭스 (이 textContent 사용), 당신은 innerHTML를 대신 사용할 수 innerText을 지원하지 않습니다

+1

우리가 기대하는 바를 알려주십시오. –

답변

3

스크립트는 innerText 속성을 사용합니다. 그러나 jQuery를 포함하고 있으므로 다음을 사용할 수도 있습니다.

current_weekday = weekday[myTodae.getDay()]; 
$("#todae").text("is " + current_weekday); 
$("#myTitle").text(current_weekday + " es " + current_weekday +" | "+ current_weekday + " go! "); 
관련 문제