呵呵,这样算吗?
<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>
<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>
解决方案 »
- checkbox中多选事件
- 真是很头疼,达人请进。。。。。
- javascrip困难的图片赋值传递问题,请各位帮帮忙!谢谢!
- js中怎么得到chechbox[]的dom序列
- 获取td下所有的input节点值
- html&javasrcipt
- 如果添加数组,并用数组替换某字符串?哪位高手能帮忙解决,很急的
- 一个onclick如何按要求执行两个事件??
- 请教:如何通过checkbox记表格的一纵向列隐藏与显示?
- transform: scale(0.8,0.8) 缩放后,怎么计算拖动的鼠标值?
- 我在一个frame里有个按钮,按下后要转到其他页面(是同一个frame里),并要刷新那个页面?
- window.open出来的页面中可以设置父页面select中option的值么?
<body>
<span id="test">变</span>
<SCRIPT language="JavaScript">
var saveFontSize="";
function testFontSize(objName){
curFontSize=document.all(objName).currentStyle.fontSize
if(saveFontSize!=""&&curFontSize!=saveFontSize)alert("change")
saveFontSize=curFontSize
}
setInterval("testFontSize('test')",300)
</SCRIPT>
</body>
</html>
hehe
<span style=font-size:12px>hehe</span>