Advertisement
inqw

Untitled

Jul 22nd, 2017
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. (function() {
  2.     console.clear();
  3.     var namePlaceholder = $('#name')[0],
  4.         apptPlaceholder = $('#appt')[0];
  5.     function prepareLocation() {
  6.         let array = window.location.href.split('?');
  7.         return array[1];
  8.     }
  9.     var args = prepareLocation(),
  10.         things = args.split('&'),
  11.         result = new Object;
  12.     for (index in things) {
  13.         let obj = things[index].split('=')
  14.         result[obj[0]] = obj[1]
  15.     }
  16.     console.log()
  17.     namePlaceholder.innerHTML = result.name
  18.     apptPlaceholder.innerHTML = result.appt
  19. })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement