index.html 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. <!doctype html>
  2. <html class="no-js" lang="">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta http-equiv="x-ua-compatible" content="ie=edge">
  6. <title></title>
  7. <meta name="description" content="">
  8. <meta name="viewport" content="width=device-width, initial-scale=1">
  9. <link rel="manifest" href="site.webmanifest">
  10. <link rel="apple-touch-icon" href="icon.png">
  11. <!-- Place favicon.ico in the root directory -->
  12. <link rel="stylesheet" href="css/normalize.css">
  13. <link rel="stylesheet" href="css/main.css">
  14. <link rel="stylesheet" href="css/styles.css">
  15. </head>
  16. <body>
  17. <!--[if lte IE 9]>
  18. <p class="browserupgrade">You are using an <strong>outdated</strong> browser. Please <a href="https://browsehappy.com/">upgrade your browser</a> to improve your experience and security.</p>
  19. <![endif]-->
  20. <!-- Add your site or application content here -->
  21. <div class="container">
  22. <p>Hello world! This is HTML5 Boilerplate.</p>
  23. <p>Enter your name please:</p>
  24. <form id="helloForm">
  25. <input id="inputName" value="" />
  26. <button class="blue" type="submit">Say hello again</button>
  27. </form>
  28. <button class="red" id="clearForm" type="button">Clear form</button>
  29. </div>
  30. <script src="js/vendor/modernizr-3.5.0.min.js"></script>
  31. <script src="https://code.jquery.com/jquery-3.2.1.min.js" integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4=" crossorigin="anonymous"></script>
  32. <script>window.jQuery || document.write('<script src="js/vendor/jquery-3.2.1.min.js"><\/script>')</script>
  33. <script src="js/plugins.js"></script>
  34. <script src="js/main.js"></script>
  35. <!-- Google Analytics: change UA-XXXXX-Y to be your site's ID. -->
  36. <script>
  37. window.ga=function(){ga.q.push(arguments)};ga.q=[];ga.l=+new Date;
  38. ga('create','UA-XXXXX-Y','auto');ga('send','pageview')
  39. </script>
  40. <script src="https://www.google-analytics.com/analytics.js" async defer></script>
  41. <script>
  42. var form = document.getElementById('helloForm');
  43. var input = document.getElementById('inputName');
  44. var clearButton = document.getElementById('clearForm');
  45. function sayHelloAgain(e) {
  46. e.preventDefault();
  47. alert('Hello ' + input.value);
  48. }
  49. function clearForm() {
  50. input.value = '';
  51. }
  52. form.onsubmit = sayHelloAgain;
  53. clearButton.onclick = clearForm;
  54. </script>
  55. </body>
  56. </html>