28、会变色的按钮

28、会变色的按钮

<html>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=gb2312">

<title>网页特效---会变色的按钮</title>

</head>

 

<body>

 

 

<style>

  .start {color:black; background:red}

</style>

<script LANGUAGE="JAVASCRIPT">

  function highlightButton(s) {

    if ("INPUT"==event.srcElement.tagName)

      event.srcElement.className=s

  }

</script>

 

<form name="form2" onmouseover="highlightButton('start')" onmouseout="highlightButton('')">

<center><p>

<input type="button" value="按这里试试" name="B2"></p>

</form>

</body>

 

</html>

Write a comment

Comments: 0