How can I use the custom javascript in button?