add javascript code to register.html