Update hw2.html

Added a script tag & carry over function name to javascript might be simpler.