JavaScript Lesson Form, DOM and event handling