Advertisement
2002VB System Services/ Functions #24582

changebutton color on Mouse move using CSS and Javascript

Better Interface

AI

สรุปโดย AI: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.

ซอร์สโค้ด
original-source
<html>
<style>
.Over
{
  BACKGROUND-COLOR: #708090;
  COLOR: #ffffff;
  CURSOR: hand
}
.Out
{
  BACKGROUND-COLOR: #c0c0c0;
  COLOR: #000000;
  CURSOR: default
}
</STYLE>
<Body>
<INPUT type="button" tagName="BUTTON" value="Button" id=button1 name=button1>
</body>
<script FOR="document" EVENT="onmouseover" LANGUAGE="javascript">
<!--
document_onmouseover() 
//-->
</script>
<script LANGUAGE="javascript" FOR="document" EVENT="onmouseout">
<!--
 document_onmouseout()
//-->
</script>
<script language="Javascript">
<!--
function document_onmouseout()
	{
		if (event.srcElement.tagName == "BUTTON")
			{
			event.srcElement.className = "Out";
			}
	}
	function document_onmouseover()
	{
		if (event.srcElement.tagName == "BUTTON")
			{
			event.srcElement.className = "Over";
			}
 }
	//-->
</script>
</html>
ความคิดเห็นดั้งเดิม (3)
กู้คืนจาก Wayback Machine