⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 time03.htm

📁 javascript源码集锦
💻 HTM
字号:
<html>

<head>
<meta NAME="&frac12;&ordf;&aring;&middot;" CONTENT="Microsoft FrontPage 3.0">
<meta NAME="resource-type" CONTENT="document">
<title>访客停留时间</title>
<style>
<!--
        A:link {text-decoration: none; color: 808080; font-family: 新细明体}
        A:visited {text-decoration: none; color: 808080; font-family: 新细明体}
        A:active {text-decoration: none; font-family: 新细明体}
        A:hover {text-decoration: underline; color: #079EDD}
-->
</style>
</head>
<script LANGUAGE="JAVASCRIPT">
<!--
var ap_name = navigator.appName;
var ap_vinfo = navigator.appVersion;
var ap_ver = parseFloat(ap_vinfo.substring(0,ap_vinfo.indexOf('(')));
var time_start = new Date();
var clock_start = time_start.getTime();
var dl_ok=false;
function init ()
{
if(ap_name=="Netscape" && ap_ver>=3.0)
dl_ok=true; 
return true;
}
function get_time_spent ()
{ 
var time_now = new Date();
return((time_now.getTime() - clock_start)/1000); 
}
function show_secs () // show the time user spent on the side
{ 
var i_total_secs = Math.round(get_time_spent()); 
var i_secs_spent = i_total_secs % 60;
var i_mins_spent = Math.round((i_total_secs-30)/60); 
var s_secs_spent = "" + ((i_secs_spent>9) ? i_secs_spent : "0" + i_secs_spent);
var s_mins_spent = "" + ((i_mins_spent>9) ? i_mins_spent : "0" + i_mins_spent);
document.fm0.time_spent.value = s_mins_spent + ":" + s_secs_spent;
window.setTimeout('show_secs()',1000); 
}
// -->
</script>


<body BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0080C0" ALINK="#FF0000" VLINK="#C0C0C0"
onLoad="init(); window.setTimeout('show_secs()',1);">
<span style="font-size: 9pt">

<form name="fm0" onSubmit="0">
  <font COLOR="#888888" size="-1"><i><div align="center"><center><p>停留時间:</i></font><br>
  <input type="text" name="time_spent" size="7" onFocus="this.blur()" BGCOLOR="#FFFFCC"> </p>
  </center></div>
</form>

<p align="center"><br>
</p>

<p align="center"><br>
</p>

<p align="center"><br>
</p>

<p align="center"> </p>
</span>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -