运行 ❯
建立您
自己的
网站
×
改变方向
保存代码
改变主题,暗/亮
前往 Spaces
<!DOCTYPE html> <html> <body> <h2>JavaScript Validation</h2> <form action="/action_page.php" method="post"> <input type="text" name="fname" required> <input type="submit" value="Submit"> </form> <p>If you click submit, without filling out the text field, your browser will display an error message.</p> </body> </html>