separate js and event from basic html