Home>Article>Web Front-end> How to determine whether the content of the text box in html is empty

There are many ways to determine whether the content of the text box in the form is empty: 1. Judge through thephpstatement 2. ThroughjsStatement judgment 3. Judge throughhtmlnative statements.
1. Determine through thePHPstatement:
Content in html:
Content in php:
//submit.php 0) echo '不空'; else echo '空 '; ?>
2. Judgment byJSstatement
JS判断input是否为空
3. Judgment byrequiredattribute
表单