<!DOCTYPE html> <html> <head> <title>サンプル1(和音が鳴るだけ)</title> <meta http-equiv="X-UA-Compatible" content="requiresActiveX=true"/> <meta charset="utf-8"> <style type="text/css"> .blue {background-color:blue;color:green; width: 500px; height: 50px;} .red {background-color:red;color:orange; width: 200px; height: 20px;} </style> </head> <body> <h1>サンプル1(和音が鳴るだけ)</h1> <object id="Jazz1" classid="CLSID:1ACE1618-1C7D-4561-AEE1-34842AA85E90" class="blue"> <object id="Jazz2" type="audio/x-jazz" class="red"> <p style="visibility:visible;">This page requires <a href=http://jazz-soft.net>Jazz-Plugin</a> ...</p> </object> </object> <script><!-- var Jazz = document.getElementById("Jazz1"); if(!Jazz || !Jazz.isJazz) Jazz = document.getElementById("Jazz2"); function play(){ if(Jazz.isJazz){ Jazz.MidiOut(0x90,60,100); Jazz.MidiOut(0x90,64,100); Jazz.MidiOut(0x90,67,100); } } function stop(){ if(Jazz.isJazz){ Jazz.MidiOut(0x80,60,0); Jazz.MidiOut(0x80,64,0); Jazz.MidiOut(0x80,67,0); } } --></script> <br> <button onmousedown='play();' onmouseup='stop();'> Press to play... </button> </body> </html>