Get URL Parameters in a ServiceNow Client Script & Catalog Client Script

Create a onload client script

function onLoad() {
var emp_sys_id = getParmVal(‘sysparm_emp_sys_id’);
}

function getParmVal(name) {
// get the current URL
var url = document.URL.parseQuery();

// decode the URL
if (url[name]) {
return decodeURI(url[name]);
} else {
return;
}
}