глобальная переменная





index.html
  • <!DOCTYPE html>
  • <html>
  • <head>
  •  <meta charset="utf-8" />
  •  <title>New Page</title>
  • </head>
  • <body>
  • <script>
  •  var val = 'This is a global variable';
  •  document.write(val);
  • </script>
  • </body>
  • </html>
  • <!DOCTYPE html>
  • <html>
  • <head>
  •  <meta charset="utf-8" />
  •  <title>New Page</title>
  • </head>
  • <body>
  • <script>
  •  var val = 'This is a global variable';
  •  document.write(val);
  • </script>
  • </body>
  • </html>