update index.html

separated js to a external file