<?php
|
namespace TimerJump;
|
#´´½¨ÈÕÆÚ£º2012-4-27 ÏÂÎç4:10:48
|
#×÷Õߣºxcc
|
#ÇëʹÓÃpost·½·¨µ÷Óô˽ӿÚ
|
$timer = intval($_POST['timer']);
|
$url = $_POST['url'];
|
$title = $_POST['title'];
|
?>
|
|
<html>
|
<head>
|
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
|
<title><?php echo htmlspecialchars($title); ?></title>
|
<style type="text/css">
|
<!--
|
.border {
|
border:0px;
|
margin: 0px;
|
}
|
-->
|
</style>
|
</head>
|
|
<body onload="setTimeout('show_secs()',1)">
|
<SCRIPT language="javascript">
|
<!--
|
var timer=<?php echo $timer;?>;
|
var jumpurl="<?php echo addcslashes($title, "\\\'\"&\n\r<>"); ?>";
|
var timerID;
|
function show_secs () // show the time user spent on the side
|
{
|
if(timer>0)
|
{
|
timer=timer-1
|
document.fm0.time_spent.value = timer;
|
timerID=setTimeout('show_secs()',1000);
|
}
|
else
|
{
|
location.href = jumpurl
|
clearTimeout(timerID)
|
}
|
}
|
-->
|
</SCRIPT>
|
<form name="fm0">
|
ÔÙ¹ý <INPUT name="time_spent" type="text" class="border" size=2 readonly="true">Ã뽫×Ô¶¯Ìø×ª£¡
|
</form>
|
</body>
|
</html>
|