rollover.htm

来自「javascript source code part1」· HTM 代码 · 共 30 行

HTM
30
字号
<HTML>
<HEAD>
<SCRIPT LANGUAGE=JavaScript>

function myPara_onmouseout() 
{ 
   var myPara = document.getElementById("DynamicText");
   myPara.firstChild.nodeValue = "Roll your mouse over my text";
   myPara.style.color = "Black"
}

function myPara_onmouseover() 
{
   var myPara = document.getElementById("DynamicText");
   myPara.firstChild.nodeValue = "Wow that feels good!!!";
   myPara.style.color = "Red"
}

</SCRIPT>
</HEAD>
<BODY>

<P ID="DynamicText" onmouseout="return myPara_onmouseout()" 
onmouseover="return myPara_onmouseover()">
   Roll your mouse over my text
</P>

</BODY>
</HTML>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?