<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>改变字的颜色</title>
<script>
function changeColor(){
document.getElementById("spnTest").style.color="red";
}
</script>
</head><body>
<span id="spnTest">IT means 'I tired'</span>
<input type="button" value="Click Me" onClick="changeColor()">
</body>
</html>