日期:2014-05-16 浏览次数:20431 次
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>111111111111</title>
<script src="js/jquery-1.7.1.js" type="text/javascript"></script>
<script type="text/javascript">
function checkColor()
{
$("#Button2").css("background-color", "#00a0e9").delay(500).css("background-color", "#7ecef4");
}
</script>
</head>
<body>
<input id="Button1" type="button" value="button" onclick="checkColor()"/>
<input id="Button2" type="button" value="button" />
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<style>
div { position: absolute; width: 60px; height: 60px; float: left; }
.first { background-color: #3f3; left: 0;}
.second { background-color: #33f; left: 80px;}
</style>
<script src="http://code.jquery.com/jquery-latest.js"></script>
</head>
<body>
<p><button>Run</button></p>
<input id="Button2" type="button" value="button" />
<div class="first"></div>
<div class="second"></div>
<script>
$("button").click(function() {
$("#Button2").css("background","#00a0e9");
setTimeout(function(){ $("#Button2").css("background","#7ecef4");}, 500);
});
</script>
</body>
</html>