Download DIV content as file?

I need to be able to download the content of a DIV element as a text file to the user’s computer… the DIV element is created on the fly from options selected in 1LD’s Siphon/Configure stacks.

What is the best way to be able to download the text to the user’s hard drive? Is there a stack which can add a download button and save the DIV content as a text file?