0

how to decode URI and show parameters separatlyenter image description here.

check attached image. Any reference is really appreciated.

faisaljanjua
  • 886
  • 2
  • 13
  • 28

2 Answers2

2

Do you know the names of the parameters? Then you could do this

http://www.angulartutorial.net/2015/04/get-url-parameter-using-angular-js.html

The url you want to decode, is it the current visited site or is it an url a user is writing in some textbox?

Then this will be your solution: https://stackoverflow.com/a/2880929/6629704 Please note that the query - variable should not be filled by window.location, instead by input value

Community
  • 1
  • 1
Dominik Heim
  • 119
  • 7
0
// Prints complete URL
document.write(window.location.href);

// Prints protocol like http: or https:
document.write(window.location.protocol); 

// Prints hostname with port like localhost or localhost:3000
document.write(window.location.host);

// Prints hostname like localhost or www.example.com
document.write(window.location.hostname);

// Prints port number like 3000
document.write(window.location.port);

// Prints pathname like /products/search.php
document.write(window.location.pathname); 

// Prints query string like ?q=ipad
document.write(window.location.search);

// Prints fragment identifier like #featured
document.write(window.location.hash);

Source: https://www.tutorialrepublic.com/javascript-tutorial/javascript-window-location.php

Amir Khadem
  • 681
  • 9
  • 26