jQuery来控制字体改变颜色。

<!DOCTYPEhtml>

<html>

<head>

<style>

p{background:yellow;font-weight:bold;cursor:pointer;padding:5px;}

</style>

<scriptsrc="http://code.jquery.com/jquery-latest.min.js"></script>

</head>

<body>

<p>Clickordoubleclickhere.</p>

<span></span>

<script>

functioncc(){

$("p").css("background-color","blue");

}

functiondd(){

$("p").css("background-color","yellow");

}

$("p").mouseover(cc);

$("p").mouseout(dd);

</script>

</body>

</html>