<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title>第几周的示例</title>
    <style>
      div {
        margin-bottom: 10px;
        position: relative;
      }

      input[type="number"] {
        width: 100px;
      }

      input + span {
        padding-right: 30px;
      }

      input:invalid+span:after {
        position: absolute;
        content: '✖';
        padding-left: 5px;
      }

      input:valid+span:after {
        position: absolute;
        content: '✓';
        padding-left: 5px;
      }
    </style>
   </head>
  <body>
    <form>
      <div>
        <label for="week">希望从哪一周开始？</label>
        <input id="week" type="week" name="week"
               min="2017-W01" max="2017-W52" required>
        <span class="validity"></span>
      </div>
      <div>
        <input type="submit" value="提交">
      </div>
    </form>


</body>
  </html>
