Edit in JSFiddle

var testUrl1 = 'https://www.youtube.com/watch?v=qyCtwmlz1Dw';
var testUrl2 = 'http://feedback.ebay.it/ws/eBayISAPI.dll?LeaveFeedback2&_trksid=p2060353.m2749.l2665&useridto=tuttocarservice&item=191585964255&transactid=1150013914009';

//get some value using dot key notation
$('#result').append(getUrlParameter(testUrl1).v + '<br/>');
$('#result').append(getUrlParameter(testUrl2).transactid + '<br/>');

//open your browser console to see all key:value parameter
console.log(getUrlParameter(testUrl1));
console.log(getUrlParameter(testUrl2));

function getUrlParameter(url) {
    var toReturn = {};
    var questionSplit = url.split('?');
    questionSplit.shift();
    var onlyParameters = questionSplit.join('?');
    var splittedParameters = onlyParameters.split('&');
    for (var c = 0; c < splittedParameters.length; c++) {
        var parts = splittedParameters[c].split('=');
        if ($.trim(parts[0]) != '') {
            toReturn[parts[0]] = parts[1];
        }
    }
    return toReturn;
}
<div id="result"></div>