Now what the above bit is doing is loading up a style sheet dynamically depending on user input. If thats not what you wanted then you would change it, pass several variables like color, size, font, etc and then fill them each in separately into your style (which would have to be included into the header). To make that little bit of code work just rename your page with a .php3 extension and you're good to go (assuming your server supports it).
Now your form is just gonna be a post form pointing to the php3 document and it'll all work.
There are several ways to achieve changing with js. One of the more flexible ones would be to do a page.html?style=xxx,
parse it with js and do a conditional document write which loads an external js which writes the stylesheet.