เอาโค้ดนี้วางไว้ในส่วนของ <head></head>
<style type="text/css">
<!--
.coolmenu{
width: 200px;
}
.coolmenu td{
background-color:bisque;
cursor:hand;
font-family:Arial;
font-weight:bold;
}
.coolmenu td a{
text-decoration:none;
color:black;
}
.coolmenu td#boxdescription{
background: ivory;
height: 25px;
font-weight: normal;
}
-->
</style>
<script language="javascript">
<!--
/*
Cool Table Menu
By Clarence Eldefors (http://www.freebox.com/cereweb) with modifications from javascriptkit.com
Visit http://javascriptkit.com for this and over 400+ other scripts
*/
function movein(which,html){
which.style.background='coral'
if (document.getElementById)
document.getElementById("boxdescription").innerHTML=html
else
boxdescription.innerHTML=html
}
function moveout(which){
which.style.background='bisque'
if (document.getElementById)
document.getElementById("boxdescription").innerHTML=' '
else
boxdescription.innerHTML=' '
}
//-->
</script>
ส่วนอันนี้ไว้ในส่วนของ <body>
<table class="coolmenu" bgcolor="black" border="1" bordercolor="ivory" cellpadding="2" cellspacing="0">
<tr>
<td bordercolor="black" id="choice1" onmouseover="movein(this,'Free DHTML Scripts')" onmouseout="moveout(this)"">
<a href="http://www.dynamicdrive.com">Dynamic Drive</a></td></tr>
<td bordercolor="black" id="choice2" onmouseover="movein(this,'Free Java applets')" onmouseout="moveout(this)">
<a href="http://freewarejava.com">Freewarejava.com</a></td></tr>
<td bordercolor="black" id="choice3" onmouseover="movein(this,'CSS Gallery/ Inspiration')" onmouseout="moveout(this)"><a href="http://www.cssdrive.com">CSS Drive</a></td></tr>
<td bordercolor="black" id="choice4" onmouseover="movein(this,'Get Coding Help')" onmouseout="moveout(this)"><a href="http://www.codingforums.com.com">Coding Forums</a></td></tr>
<tr>
<td bordercolor="black" id="boxdescription"></td></tr>
</table>
<p>This free script provided by<br />
<a href="http://javascriptkit.com">JavaScript
Kit</a></p>
ไม่มีความคิดเห็น:
แสดงความคิดเห็น