yano3nora
7/2/2017 - 9:19 AM

[html: annotation by title attr] HTML5のフォームインプットバリデーションの注釈はtitleでできるぽい。 #html

[html: annotation by title attr] HTML5のフォームインプットバリデーションの注釈はtitleでできるぽい。 #html

<form action="sample-input.php" method="post">
  <p>
    <label>
      郵便番号:
      <input name="sampleName" pattern="\d{3}-\d{4}" title="郵便番号は、「123-4567」のように、「3桁の数字、ハイフン(‐)、4桁の数字」の順で入力して下さい。">
    </label>
  </p>
  <p><input type="submit" value="送信"></p>
</form>