Increment a number by clicking onto a button

前端 未结 2 1716
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-01-01 01:04

I have the number $likes_number in a div block on my page. I would like to know how to increment it dynamically by clicking on a button?

My code

2条回答
  •  忘掉有多难
    2021-01-01 01:17

    
    

    Live example: https://jsfiddle.net/nTmu7/2/

提交回复
热议问题