How to trigger an onclick function in js only if input field is not empty?

后端 未结 0 1502
北海茫月
北海茫月 2020-12-07 01:49

Here, I want the function to trigger only if i have typed something in the input field. If it\'s empty I want to alert that it can\'t be empty. I tried if else condition but

相关标签:
回答
  • 消灭零回复
提交回复
热议问题