[求助] 一个dhtml的小问题,帮帮我啊!!
<P>小弟初学dhtml 有段代码不解 望大虾们指教本来目的是使文字在绿色和红色之间切换 但是变成了红色就不再变了 问什么啊?
<html>
<head>
<title>DHtml举例6</title>
<script language="JavaScript">
function change_text(){
if(document.all.Dragon.style.color=="Red"){
document.all.Dragon.style.color="Green";
}
else
{
document.all.Dragon.style.color="Red";
}
}
</script>
<style>
h3 {font-size:45}</P>
<P></style>
</head>
<body>
<br>
<h3 id="Dragon" align="center" onmouseover="change_text()" onmouseout="change_text()">我是变色龙!</h3>
</body>
</html></P>[em04][em04][em04]
<P> {<BR> document.all.Dragon.style.color="Green";<BR> <BR> }<BR> else<BR> {<BR> document.all.Dragon.style.color="Red";<BR> } <BR>}<BR>function change_text2()<BR>{<BR>if(document.all.Dragon.style.color=="green")</P>
<P> {<BR> document.all.Dragon.style.color="red";<BR> <BR> }<BR> else<BR> {<BR> document.all.Dragon.style.color="green";<BR> } <BR>}<BR></script><BR><style> <BR>h3 {font-size:45}</P>
<P></style><BR></head><BR><body><BR><br><BR><h3 id="Dragon" align="center" onmouseover="change_text1()" onmouseout="change_text2()">我是变色龙!</h3><BR></body><BR></html><BR></P>
页:
[1]
