<html xmlns:ie> <head> <title>是否在线.-中国站长站www.chinaz.com</title> <mce:style><!-- @media all { IE/:CLIENTCAPS {behavior:url(#default#clientCaps)} } *{font:menu} --></mce:style><style mce_bogus="1">@media all { IE/:CLIENTCAPS {behavior:url(#default#clientCaps)} } *{font:menu}</style> </head> <body> 正在上网时,把网卡禁用后,大约四秒中检测出离线!!,启用网卡后8秒左右检测出在线!!! <IE:CLIENTCAPS ID="oClientCaps" /> <mce:script Language="javascript"><!-- function onlineOrNot() { onlinestate = (oClientCaps.connectionType == "offline")?"<font color=red>离线</font>":"<font color=green>在线</font>" statehtml.innerHTML += onlinestate+"," } setInterval("onlineOrNot()",1000) // --></mce:script> <div id=statehtml></div> </body> </html>