リンクボタン
MENU
12345
Home
Java
Html
リンク先は全てJavaScriptMainにしています
Source
<HTML lang="ja"> <HEAD> <TITLE>JavaScript</TITLE>
<STYLE TYPE="text/css"> BODY { background-color: #add8e6; color: #ffffff; font-size: 12px; } .BtnA { text-align: center; width: 150px; background-color: #800000; font-size: 18px; color: #ffffff; font-weight: bold; border: 2px solid #ffffff; cursor: pointer; } .BtnA:hover { background-color: #ff00ff; } .BtnB{ text-align: center; width: 150px; background-color: #0000ff; font-size: 18px; color: #ffffff; font-weight: bold; border: 2px solid #ffffff; cursor: pointer; } .BtnB:hover { background-color: #800000; } .BtnC { text-align: center; width: 150px; background-color: #7b68ee; font-size: 18px; color: #ffffff; font-weight: bold; border: 2px solid #ffffff; cursor: pointer; } .BtnC:hover { background-color: #006400; } </STYLE> <SCRIPT> function jump(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" } } </SCRIPT> </head> <BODY> <center> <form name="form1"> <button TYPE="button" onClick="jump('go1')" class="BtnA">Home</button> <button TYPE="button" onClick="jump('go2')" class="BtnB">Java</button> <button TYPE="button" onClick="jump('go3')" class="BtnC">Html</button> </form> </p> </body> </html>