setInterval() displays only once the current time in mozilla. Chrome does not have any problem to display the time every second.