<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="
http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>魔塔时间戳换算器V1.1</title>
<style type="text/css">
<!--
.STYLE1 {
color: #FFFFFF;
font-weight: bold;
font-size: 12px;
}
.STYLE2 {
color: #000000;
font-size: 12px;
}
.STYLE3 {color: #FF0000}
.STYLE4 {
color: #999999;
font-size: 12px;
}
-->
</style>
<script type="text/javascript">
<!--
function jis(){
if (form1.select.value=="0"){
if (form1.textfield.value<2006){
JG.innerHTML="年份小于2006的不能表示为时间戳";return false;
}else if (day(form1.textfield.value,form1.textfield2.value,form1.textfield3.value)){
JG.innerHTML="日期格式错误";return false;
}
f=[(form1.textfield.value-2006)*12+parseFloat(form1.textfield2.value)]*100+parseFloat(form1.textfield3.value);
if (isNaN(f)){
JG.innerHTML="日期格式错误";return false;
}
JG.innerHTML=f;
}else{
f=form1.textfield4.value;h=parseFloat(f.substring(0,f.length-2)); // 月
d=parseFloat(f.substring(f.length-2,f.length)); // 日
y=Math.floor(h/12)+2006;m=h%12;
if (m==0){
m=12;y--;
}
if (day(y,m,d)){
JG.innerHTML="日期格式错误";return false;
}else{
JG.innerHTML=y+"年"+m+"月"+d+"日";return true;