Advertisement
Guest User

Untitled

a guest
Apr 18th, 2019
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.19 KB | None | 0 0
  1. export function q(name) {
  2. let reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
  3. let r = window.location.search.substr(1).match(reg);
  4. return r != null ? decodeURIComponent(r[2]) : '';
  5. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement