x
 
<!DOCTYPE html>
<html>
<body>
<h1>input required 属性</h1>
<form action="/demo/action_page.php">
  <label for="username">用户名:</label>
  <input type="text" id="username" name="username" required>
  <input type="submit">
</form>
</body>
</html>