Javascript question

You know how you can dynamically insert new upload boxes in gmail? Anyone know how that is done in Javascript? I know how to handle multiple uploads on the server, just not sure how hard/easy it is to dynamically insert elements on a page in JS.