复制代代码如下: <br><!--<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>var time_start = new Date();<BR>var Clock_start = time_start.getTime();<BR>var dl_ok=false;<BR>function init ()<BR>{<BR>if(ap_name= ="Netscape" && ap_ver>=3.0)<br>dl_ok=true; <br>return true;<br>}<br>function get_time_spent ()<br>{ <br>var time_now = new Date();<br>return((time_now.getTime() - Clock_start)/1000); <br>}<br>function show_secs () // ユーザーがサイドに費やした時間を表示します<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 = "" ((i_secs_spent>9) ? i_secs_spent : "0" i_secs_spent);<br>var s_mins_spent ="" ((i_mins_spent>9) ? i_mins_spent : "0" i_mins_spent);<br>document.fm0.time_spent.value = s_mins_spent ":" s_secs_spent;<br>window.setTimeout('show_secs()',1000); <br>}<br>// --><br>