jQuery来控制字体改变颜色
jQuery来控制字体改变颜色。
<!DOCTYPE html>
<html>
<head>
? <style>
p { background:yellow; font-weight:bold; cursor:pointer; padding:5px; }
</style>
? <script src="http://code.jquery.com/jquery-latest.min.js"></script>
</head>
<body>
? <p>Click or double click here.</p>
<span></span>
<script>
function cc(){
$("p").css("background-color", "blue");
}
function dd(){
$("p").css("background-color", "yellow");
}
$("p").mouseover(cc);
$("p").mouseout(dd);
</script>
</body>
</html>