poporpepopo / something

1 stars 0 forks source link

sample (define DOCUTYPE). #1

Open rintaronakamura opened 5 years ago

rintaronakamura commented 5 years ago
<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title>render date and time</title>
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js"></script>
  </head>
  <body>
    <script type="text/javascript">
      $(function(){
        setInterval(function(){
          var now = new Date();
          $('title').html(now.toLocaleDateString() + '\t' + now.toLocaleTimeString());
        }, 1000);
      });
    </script>
    <p>clock</p>
  </body>
</html>

DOCTYPEとは https://hail2u.net/documents/html-best-practices.html#start-with-doctype

poporpepopo commented 5 years ago

thx