网页 鼠标 按钮变色

来源:百度知道 编辑:UC知道 时间:2024/06/18 03:42:03
当鼠标移动到按钮时按钮变色
在asp网页中实现

<html>
<head>
<style>
<!--
/*change the color name below to the color you want initially applied to the button. ie:blue*/

.initial2{border:2px groove #c0c0c0;color:#fff;background-color:#003366;cursor:pointer;}
//-->
</style>

<script>
<!--
/*
Rollover background-color button Script-
?Dynamic Drive (www.dynamicdrive.com)
For full source code, installation instructions,
100's more DHTML scripts, and Terms Of
Use, visit dynamicdrive.com
*/
function change(color){
var el=event.srcElement
if (el.tagName=="INPUT"&&el.type=="button")
event.srcElement.style.backgroundColor=color
}
function jumpto2(url){window.location=url;}
//-->
</script>
</head>
<body>
<form onMouseover="c