呵呵,这样算吗?
<html>
<body>
<span id="test">变</span>
<SCRIPT language="JavaScript">
var miFontSize = test.offsetWidth;
testFontSize();
function testFontSize(){
if (test.offsetWidth!=miFontSize){
if (test.offsetWidth>miFontSize){
alert("变大");
}else{
alert("变小");
}
miFontSize = test.offsetWidth;
}
setTimeout("testFontSize()",100)
}
</SCRIPT>
</body>
</html>