Using “if/else” with OnClick

后端 未结 5 1305
悲&欢浪女
悲&欢浪女 2021-01-06 08:51

First of all, is it even possible to write if/else statements directly in html with onclick attribute? And if so, why is my code not working?

So this is a button. T

5条回答
  •  無奈伤痛
    2021-01-06 09:43

    Just DON'T put it in the onclick attribute.

    Use

    
    
    

提交回复
热议问题