リンクボタン MENU



リンク先は全てJavaScriptMainにしています


Source

    <HTML lang="ja"> <HEAD> <TITLE>文字の色を変更する</TITLE> <STYLE TYPE="text/css"> <!-- BODY {background-color: #2E8B57; color: #ffffff; font-size: 12pt; } .BtnA{text-align: center; width: 150px; background-color: #800000; font-size: 18px; color: #ffffff; font-weight: bold; } .BtnB{text-align: center; width: 150px; background-color: #0000ff; font-size: 18px; color: #ffffff; font-weight: bold; } .BtnC{text-align: center; width: 150px; background-color: #7b68ee; font-size: 18px; color: #ffffff; font-weight: bold; } //--> </STYLE> <SCRIPT LANGUAGE="JavaScript"> <!-- function go(lnk){ switch(lnk) { case "go1": parent.location.href = "scrm.html" break; case "go2": parent.location.href = "scrm.html" break; case "go3": parent.location.href = "scrm.html" } } function chgbg(clr,kbn) { switch(kbn) { case "B1":form1.B1.style.backgroundColor=clr; break; case "B2":form1.B2.style.backgroundColor=clr; break; case "B3":form1.B3.style.backgroundColor=clr; } } //--> </SCRIPT> </head> <BODY><form name='myForm1'> <p align="center"> <form name="form1"> <button TYPE="button" onClick="jump('go1')" class="BtnA" id="B1" onMouseover="this.style.color='#00ffff'; chgbg('#ff00ff','B1')" onMouseout="this.style.color='#ffffff'; chgbg('#800000','B1')">Home</button> <button TYPE="button" onClick="jump('go2')" class="BtnB" id="B2" onMouseover="this.style.color='#ffff00'; class="BtnB" id="B2" onMouseout="this.style.color='#ffffff'; chgbg('#0000ff','B2')">Java</button> <button TYPE="button" onClick="jump('go3')" class="BtnC" id="B3" onMouseover="this.style.color='#ffff00'; chgbg('#006400','B3')" onMouseout="this.style.color='#ffffff'; chgbg('#7b68ee','B3')">Html</button> </form> </p> </body> </html>