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>
标签:jQuery,function,颜色,color,yellow,字体,background,css
From: https://blog.51cto.com/u_16179085/6663455