How can I create a button that activates and deactivates within a particular time period?

I’m designing the website for a tution class. Therefore I want to design the students can be logged into the class session at a certain time period only…

Please give me a brief answer.

See the Open for Business example which shows how to show/hide elements based on a set schedule. Instead of showing/hiding open or closed sign images, you can enable/disable your login button. Or, you can allow access to the class during session hours, and when the class is not in session display a page stating that the class is not in currently in session and to come back at the scheduled time.