Your first request seems like you want to find any link whose target attribute starts with a specific value. If so, the next selector will work. You stated that you need the full target attribute, so I pull it out using the method $.attr().
var fullTarget = $("a[target^='UniqueString_']").attr("target");
, HREF :
var link = $("a#myID");
$(link).attr("href", $(link).attr("href") + "&color=" + fullTarget);