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

📄 17.htm

📁 Java Script & VB Script 教程
💻 HTM
字号:
<html>

<head>
<meta HTTP-EQUIV="Content-Type" CONTENT="text/html;charset=gb2312">
<title>停留时间</title>
</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 onLoad="init(); window.setTimeout('show_secs()',1);" BGCOLOR="#FFFFFF"
TEXT="#000000" LINK="#0000FF" VLINK="#FF00FF" ALINK="#FF0000"
BACKGROUND="../../images/backb.gif">
<!--◆前言◆-->
<div align="center"><center>

<table BORDER="0" WIDTH="470" CELLPADDING="5" CELLSPACING="2">
  <tr>
    <td><font SIZE="6">进</font>站时间、小时钟都不稀奇,能够测出您在此网页停留多久的时间才稀奇!不过,会不会因为使用者看了这个时钟後,发现自己停留的时间太久了,而...。这...就看您如何使用罗! 
    </td>
  </tr>
</table>
</center></div>

<form name="fm0" onSubmit="0">
  <font COLOR="#888888" size="-1"><i><p>停留时间:</i></font><br>
  <input type="text" name="time_spent" size="7" onFocus="this.blur()"> </p>
</form>
<!--◆加入步骤◆-->
<div align="center"><center>

<table BORDER="0" WIDTH="470">
  <tr>
    <td></td>
    <td></td>
  </tr>
  <tr>
    <td ALIGN="LEFT" BGCOLOR="#fde2bf" WIDTH="420"><font SIZE="+1">加入网页步骤:</font></td>
  </tr>
  <tr>
    <td></td>
  </tr>
</table>
</center></div><div align="center"><center>

<table BORDER="0" WIDTH="450">
  <tr>
    <td><ol>
      <li>将以下的控制码先复制起来。<font color="#fbb339">(用滑鼠将底下的一堆黑色部份的程式码,标记起来,按滑鼠右键选择【复制】就行啦!)</font> 
      </li>
      <li>然後在网页中的 &lt;/HEAD&gt; 
        之後将刚刚复制的东西贴上就大功告成了!<font color="#fbb339">(按滑鼠右键选择【贴上】就行啦!)</font> 
      </li>
      <li>最後,更改原始码中的内容就可以了!<font color="#fbb339">(就是紫红色的地方,改成您想要的内容即可!)</font> 
      </li>
    </ol>
    <p align="center"><!--◆列出原始码◆--> </p>
    <div align="center"><center><table BORDER="0" WIDTH="390">
      <tr>
        <td BGCOLOR="#dcfef3"><br>
        <font color="#a79ea3">&lt;HTML&gt;<br>
        <p>&lt;HEAD&gt;<br>
        &lt;META HTTP-EQUIV=&quot;Content-Type&quot; 
        CONTENT=&quot;text/html;CHARSET=big5&quot;&gt;<br>
        &lt;TITLE&gt;停留时间&lt;/TITLE&gt;<br>
        &lt;/HEAD&gt;<br>
        </font></p>
        <p>&lt;SCRIPT LANGUAGE=&quot;JAVASCRIPT&quot;&gt;<br>
        &lt;!--<br>
        var ap_name = navigator.appName;<br>
        var ap_vinfo = navigator.appVersion;<br>
        var ap_ver = parseFloat(ap_vinfo.substring(0,ap_vinfo.indexOf('(')));<br>
        </p>
        <p>var time_start = new Date();<br>
        var clock_start = time_start.getTime();<br>
        var dl_ok=false;<br>
        </p>
        <p>function init ()<br>
        {<br>
        if(ap_name==&quot;Netscape&quot; &amp;&amp; ap_ver&gt;=3.0)<br>
        dl_ok=true; <br>
        return true;<br>
        }<br>
        </p>
        <p>function get_time_spent ()<br>
        { <br>
        var time_now = new Date();<br>
        return((time_now.getTime() - clock_start)/1000); <br>
        }<br>
        </p>
        <p>function show_secs () // show the time user spent on the side<br>
        { <br>
        var i_total_secs = Math.round(get_time_spent()); <br>
        var i_secs_spent = i_total_secs % 60;<br>
        var i_mins_spent = Math.round((i_total_secs-30)/60); <br>
        var s_secs_spent = &quot;&quot; + ((i_secs_spent&gt;9) ? i_secs_spent : &quot;0&quot; + 
        i_secs_spent);<br>
        var s_mins_spent = &quot;&quot; + ((i_mins_spent&gt;9) ? i_mins_spent : &quot;0&quot; + 
        i_mins_spent);<br>
        document.fm0.time_spent.value = s_mins_spent + &quot;:&quot; + s_secs_spent;<br>
        window.setTimeout('show_secs()',1000); <br>
        }<br>
        </p>
        <p>// --&gt;<br>
        </p>
        <p>&lt;/SCRIPT&gt;<br>
        </p>
        <p><font color="#a79ea3">&lt;BODY</font> onLoad=&quot;init(); 
        window.setTimeout('show_secs()',1);&quot;<font color="#a79ea3">&gt;</font><br>
        </p>
        <p>&lt;form name=&quot;fm0&quot; onSubmit=&quot;0&quot;&gt;<br>
        &lt;font size=&quot;-1&quot;&gt;&lt;I&gt;&lt;FONT COLOR=&quot;#888888&quot;&gt;<font
        color="#ff0080">停留时间</font>:&lt;/FONT&gt;&lt;/I&gt;&lt;/font&gt;&lt;br&gt;<br>
        &lt;INPUT type=&quot;text&quot; name=&quot;time_spent&quot; size=7 
        onFocus=&quot;this.blur()&quot;&gt;<br>
        &lt;/form&gt;<br>
        </p>
        <p><font color="#a79ea3">&lt;/BODY&gt;<br>
        </p>
        <p>&lt;/HTML&gt;<br>
        </font></td>
      </tr>
    </table>
    </center></div></td>
  </tr>
</table>
</center></div><!--◆常见问题◆-->
<layer src="http://www.spidersoft.com/ads/bwz468_60.htm" visibility="hidden" id="a1" width="600" onload="moveToAbsolute(ad1.pageX,ad1.pageY); a1.clip.height=60;visibility='show';">
</layer>


<p align="center">本站点由<a href="http://www.yesite.com" target="_parent">广州热讯公司</a>与<a
href="http://www.yongchun.com/club" target="_parent">中国网虫俱乐部</a>合作推出<br>
Copy right (c) 1999 </p>
</body>
</html>

⌨️ 快捷键说明

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