| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788 |
- <!doctype html>
- <html class="no-js" lang="">
- <head>
- <meta charset="utf-8">
- <meta http-equiv="x-ua-compatible" content="ie=edge">
- <title>Formation jQuery</title>
- <meta name="description" content="">
- <meta name="viewport" content="width=device-width, initial-scale=1">
- <link rel="manifest" href="site.webmanifest">
- <link rel="apple-touch-icon" href="icon.png">
- <!-- Place favicon.ico in the root directory -->
- <link rel="stylesheet" href="css/normalize.css">
- <link rel="stylesheet" href="css/main.css">
- <link rel="stylesheet" href="css/styles.css">
- </head>
- <body>
- <!--[if lte IE 9]>
- <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>
- <![endif]-->
- <!-- Add your site or application content here -->
- <div class="container">
- <p>Hello world! This is HTML5 Boilerplate.</p>
- <p>Today's date: <span id="todaysDate"></span>.</p>
- <p>Enter your name please:</p>
- <form id="helloForm">
- <input id="inputName" value="" />
- <button class="blue" type="submit">Say hello again</button>
- </form>
- <button class="red" id="clearForm" type="button">Clear form</button>
- <div id="ajax"></div>
- <button class="blue" id="getAjax" type="button">Get HTML with Ajax</button>
- </div>
- <script src="js/vendor/modernizr-3.5.0.min.js"></script>
- <script src="https://code.jquery.com/jquery-3.2.1.min.js" integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4=" crossorigin="anonymous"></script>
- <script>window.jQuery || document.write('<script src="js/vendor/jquery-3.2.1.min.js"><\/script>')</script>
- <script src="js/plugins.js"></script>
- <script src="js/main.js"></script>
- <!-- Google Analytics: change UA-XXXXX-Y to be your site's ID. -->
- <script>
- window.ga=function(){ga.q.push(arguments)};ga.q=[];ga.l=+new Date;
- ga('create','UA-XXXXX-Y','auto');ga('send','pageview')
- </script>
- <script src="https://www.google-analytics.com/analytics.js" async defer></script>
- <script>
- $(document).ready(function() {
- var form = $('#helloForm');
- var input = $('#inputName');
- var clearButton = $('#clearForm');
- var dateSpan = $('#todaysDate');
- var ajaxButton = $('#getAjax');
- function sayHelloAgain(e) {
- e.preventDefault();
- alert('Hello ' + input.val());
- }
- function clearForm() {
- input.val('');
- }
- function showDate() {
- var date = new Date().toString();
- dateSpan.html(date);
- }
- showDate();
- setInterval(showDate, 1000);
- function loadDoc() {
- $.get('some-text.html', function(html) {
- $('#ajax').html(html);
- });
- }
- form.submit(sayHelloAgain);
- clearButton.click(clearForm);
- ajaxButton.click(loadDoc);
- });
- </script>
- </body>
- </html>
|