Advertisement
Guest User

Untitled

a guest
Feb 18th, 2020
411
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 1.78 KB | None | 0 0
  1. <!DOCTYPE HTML>
  2. <html lang='en'>
  3.     <head>
  4.         <title>Zara!</title>
  5.         <link rel="stylesheet" href="styles.css">
  6.         <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
  7.     </head>
  8.         <body style = "background-color: #FFF0F5; text-align: center;">
  9.         <div class="alert alert-info" role="alert">
  10.               Location, location, location.
  11.         </div>
  12.             <p>Where are you from?</p>
  13.             <select>
  14.                 <option value="Dubai" selected>--</option>
  15.                 <option value="Australia">Australia</option>
  16.                 <option value="Dubai">Dubai</option>
  17.                 <option value="Other">Other</option>
  18.             </select>
  19.             <p></p>
  20.             <p id = "oka"></p>
  21.             <p id = "oki"></p>
  22.             <p></p>
  23.             <button id="map">
  24.                 Click for ya map
  25.             </button>
  26.             <script>
  27.                 document.querySelector('select').onchange = function() {
  28.                     document.querySelector('#oka').innerHTML = "Okay, so you're saying you're from "+this.value+"."
  29.                 }
  30.                 navigator.geolocation.getCurrentPosition(function(position) {
  31.                    document.querySelector('#oki').innerHTML = ("Well, according to my data your current position is "+position.coords.latitude + ", " + position.coords.longitude + '. Zara will be with you shortly.');
  32.                 });
  33.                 document.querySelector('#map').onclick = function() {
  34.                     location.href = "https://www.google.com/maps/place/";
  35.                 }
  36.             </script>
  37.         </body>
  38. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement