我需要在鼠标悬停时更改背景图像,但不知道该怎么做,因为它在我没有写的 document.write 中。任何帮助表示赞赏。这是我到目前为止所拥有的。我希望 B 是正常的,鼠标悬停时的 MO。
<script type="text/javascript">
function DrawRow (Link,Status) {
B = "../Images/GreenButton.png" ;
MO = "../Images/GreenButtonMouseOver.png" ;
color1 = "#66FF33"; color2="#000000"; color3="#000000"; color4="#000000"; color5="#000000";
//====================================================================================================================
// Check User Defined States By Rule
//====================================================================================================================
if ( Status4 ) { B="../Images/BlueButton.png"; MO="../Images/BlueButtonMouseOver.png"; color1="#FFFFFF"; }
if ( Status32 ) { B="../Images/LightGreenButton.png"; B="../Images/LightGreenButtonMouseOver.png"; C1color="#000000"; }
if ( Status2 ) { B="../Images/YellowButton.png"; MO="../Images/YellowButtonMouseOver.png"; C1color="#000000"; }
if ( Status1 ) { B="../Images/OrangeButton.png"; MO="../Images/OrangeButtonMouseOver.png"; C1color="#000000"; }
if ( Status8 ) { B="../Images/RedButton.png"; MO="../Images/RedButtonMouseOver.png";C1color="#FFFF00"; }
if ( Status16 ) { B="../Images/PurpleButton.png"; MO="../Images/PurpleButtonMouseOver.png"; C1color="#000000"; }
document.write( "<td ONCLICK=\"Jump('"+Link+"')\"onmouseover=\"this.style.cursor='hand'\" height='37' width='350' background='"+B+"' ><font color='"+color1+"'><p align='center'><b>"+T+"</b></td>" );