网页特效 onmouseover 如何改变字体颜色
发布网友
发布时间:2022-04-21 03:55
我来回答
共4个回答
热心网友
时间:2022-04-21 05:25
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<script language="javascript" type="text/javascript">
function getCSS(){
var csst = document.getElementById('testCss').style;
csst.color='red';
}
function lostCSS(){
var csst = document.getElementById('testCss').style;
csst.color='';
}
</script>
</head>
<body>
<table>
<tr onmousemove="getCSS();" onmouseout="lostCSS();" >
<td id="testCss">晚上好,挖哈哈</td>
</tr>
</body>
</html>
补充回答:<tr onmousemove="javascript:this.style.color='red';" onmouseout="javascript:this.style.color='';" >
热心网友
时间:2022-04-21 06:43
<html>
<body>
<table border='1'>
<tr onmousemove="javascript:this.style.color='blue'" onmouseout="javascript:this.style.color=''" >
<td>晚上好,挖哈哈</td><td>晚上好,挖哈哈</td>
</tr>
</table>
</body>
</html>
热心网友
时间:2022-04-21 08:17
用js更改字体样式css
热心网友
时间:2022-04-21 10:09
onmousemove="javascript:this.style.color=#####"