要完成此效果需要两个步骤
第一步:把如下代码加入到<head>区域中
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function doColor(item, color, bg) {
item.style.color = color; // changes text color
item.style.backgroundColor = bg; // changes background
}
function undoColor(item) {
item.style.color = "#000000"; // sets color back to black
item.style.backgroundColor = ""; // sets background to default
}
// End -->
</script>
第二步:把如下代码加入到<body>区域中
<div align="center"><a name="link1" href="mailto:%20typhoon@huzhoucity.com" onmouseover="doColor(link1, 'yellow','black');" onmouseout="undoColor(link1);" target="_blank">typhoon</a> </div> <p align="center"> <a name="link2" href="http://typhoon.500.to" onmouseover="doColor(link2, 'blue','red');" onmouseout="undoColor(link2);" target="_blank">Typhoon Start </a>
|