For a variety of security concerns, I do NOT recommend doing this. If you an shutdown the server from your web browser, it's a safe assumption that others could do the same...
Besides, it'll leave your browser in a strange state, assuming the shutdown succeeded. As a general rule, system shutdowns should only be allowed from the local machine. I believe that by default, FreeBSD systems don't allow remote system shutdowns.
I really, really advise against this.
The question that just begs to be asked is "Why would you want to shutdown the system, anyway?"
Linux / BSD / Solaris systems are designed so that when properly configgered, you plug em in, turn 'em on, and rip the knob off.