Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (function() {
- console.clear();
- var namePlaceholder = $('#name')[0],
- apptPlaceholder = $('#appt')[0];
- function prepareLocation() {
- let array = window.location.href.split('?');
- return array[1];
- }
- var args = prepareLocation(),
- things = args.split('&'),
- result = new Object;
- for (index in things) {
- let obj = things[index].split('=')
- result[obj[0]] = obj[1]
- }
- console.log()
- namePlaceholder.innerHTML = result.name
- apptPlaceholder.innerHTML = result.appt
- })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement