日期:2014-05-16 浏览次数:20392 次
<HTML xmlns:CAP>
<HEAD>
<TITLE>JS检测用户是否上网</TITLE>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html;charset=gb2312">
<style>
@media all {CAP\\:clientCaps {behavior:url(#default#clientcaps)}}
</style>
<script for=window event=onload>
if (oClientCaps.connectionType=="online")
{
sType.innerText="Internet欢迎您!";
}
else
{
sType.innerText="怎么没有上网?";
}
</script>
</HEAD>
<BODY>
<CAP:clientCaps id="oClientCaps" />
<div id=sType></div>
</BODY>
</HTML>