Despite the other two answers, here is an alternative,
$('img[src]').each(function (i,n){
var item = $(n).attr('src');
var query = item.split('?');
var items = query.split('&') ;
// so now you get the point, u split each item again by the "=" sign :) this is reusable
// provided you put it on a function, and it can search to return a specific one, with a little imagination :)
});
Another alternative is by using the URI library.
I have used this numerous times and you get exactly what you want, and get everything to do with URI/URL manipulations.
http://medialize.github.io/URI.js/
$('img[src]').each(function (i,n){
var src = $(n).attr('src');
var get_query = URI(src).query()
console.log(get_query)
});
here are some examples...
URI("testme?test").query();// returns: test
URI("testme?a=1&b=2").query(true) // returns: {a: "1", b: "2"}
URI("testme?font_size=15&font_name=arial").query(true).font_size // 15
more information about how to use ... click here http://medialize.github.io/URI.js/docs.html#accessors-search