[javascript] How to check whether a Button is clicked by using JavaScript