You're talking about 2 totally different formats, I'm not aware of any easy way do that.
Unless you have specific reasons for using MIDI on a website, I can't recommend it. Unless you're using General MIDI samples, which generally sound like crap, what goes in on your end may not even closely resemble what comes out at their end.