document.getElementById('my_iframe').src = 'www.examples.com?x=asd&y=awe';
The DOM API provided by the browser gives you things that look like objects with ordinary properties. They're not "ordinary" properties, of course, because magic things happen when you set them (well some of them).
With "modern" versions of jQuery, in a situation like this it's (a little bit) better to use .prop()
instead of .attr()
.