Fix JavaScript error

1. open the top page
2. you get ```Uncaught TypeError: Cannot read property 'value' of null ```