In the Game Maker FAQ you have the following question:
Can I embed a game made with Game Maker in a webpage?
Your answer is:
Not directly. There is a project out there called G-Java that is aimed at converting Game Maker source files into Java applets.
My answer is:
Yes you can, look on google for a program called Web Game Builder(It's Free) and use that. It works perfectly for me!
When compiling it all set the text colour to black so the 'trial version' text can not be seen!