이 작동하지 않을 수 있습니다. current_times.getMinutes이자바 스크립트 전역 변수를 사용하여
참고 확신이 도움이 함수가 아니라 시간의 기능은 신체 부하에서 시작되는 함수에서 호출되어지고
var current_times = new Date();
var future_times = new Date();
function time(){
current_times = current_times.setMinutes(current_times.getMinutes());
future_times = future_times.setMinutes(future_times.getMinutes() + 1);
}
오류 메신저입니다.
이 코드에 문제가있을 수 있습니다. 어떤 브라우저를 사용하고 있습니까? 예상했던대로 Chrome에서 문제를 재현 할 수 없습니다. –
1. 붙여 넣은 특정 코드가 작동합니다. 2. getMinutes()에 setMinute를 설정하지 마십시오. 왜 그랬니?! – Khez
완전한 비 작동 코드 샘플을 게시하십시오. – Hamish