HTML/Javascript Button Click Counter

前端 未结 5 1233
南笙
南笙 2020-12-09 10:24

I have done something similar to this before, and I know this is really close. I\'m just trying to make it so that my button increments the javascript variable, and the func

5条回答
  •  猫巷女王i
    2020-12-09 10:52

    Don't use the word "click" as the function name. It's a reserved keyword in JavaScript. In the bellow code I’ve used "hello" function instead of "click"

    
    
        Space Clicker
    
    
    
        
        
        

    Clicks: 0

提交回复
热议问题