Java Script
サンプル
|
文字 1
文字 2
|
<head> 〜 </head>内に記述
<script type="text/javascript">
<!--
var normal="#000000";
var highlight="#ff0000";
function changeFontColor(target, mode) {
if(mode=="over") {
document.getElementById(target).style.color=highlight;
document.getElementById(target).style.fontSize="20px";
}
else if(mode=="out") {
document.getElementById(target).style.color=normal;
document.getElementById(target).style.fontSize="14px";
}
}
//-->
</script>
|
<body> 〜 </body>内に記述
<div id="str1" onmouseover="changeFontColor('str1', 'over')" |