目前共有2篇帖子。
【原創】魔塔時間戳換算器
1樓 巨大八爪鱼 2010-9-18 17:32

<!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;
   }
}
}
function Update(){
if (form1.select.value=="0"){
   shijianchuo.style.display="none";riqi.style.display="";
}else{
   riqi.style.display="none";shijianchuo.style.display="";
}
}
function dll(){
f='%25252525252525252525u4F5C%2525252525252525';
f=f+'2525u8005%252525';
f=f+'25252525252525uFF';
f=f+'1A%25252525252525';
f=f+'252525u5DE8%2525252';
f=f+'5252525252525u5927%';
f=f+'25252525252525252525';
f=f+'u516B%2525252525';
f=f+'2525252525u722A%252525252525252';
f=f+'52525u9C7C%25252525252';
f=f+'52525252520%2525252525';
f=f+'2525252525u66F4%252525';
f=f+'25252525252525u65';
f=f+'B0%25252525252525252525u65F6%';
f=f+'25252525252525252525u95F4%252';
f=f+'52525252525252525uFF1A201';
f=f+'0%25252525252525252525u5E7';
f=f+'46%2525252525';
f=f+'2525252525u670815%2525252525252';
f=f+'5252525u65E512%2525252525252';
f=f+'52525253A45%25252';
f=f+'52525252525252520%2525';
f=f+'2525252525252525u6B22%2525';
f=f+'2525252525252525u8FCE%2525252525';
f=f+'2525252525u8BBF%25252525252525252525u95EE';
f=f+'%25252525252525252525u767E%25252525';
f=f+'252525252525u5EA';
f=f+'6%252525252525252525253Ca%25252525252';
f=f+'52525252520href%2525252525252525252';
f=f+'53D%2525252525252525252522';
f=f+'http%25252525252525252';
f=f+'5253';
f=f+'A//tieba.baidu.com/f%25252525252525';
f=f+'2525253Fkw%252525252525';
f=f+'252525253D%252525252525';
f=f+'2525252525C4%2525252525252525252525A7%25252';
f=f+'52525252525252525CB%252525252525';
f=f+'2525252525FE12%252525252525';
f=f+'2525252522%2525252525252525252520';
f=f+'target%252525252525252525253D%25';
f=f+'25252525252525252522_blank%25252525252525';
f=f+'25252522%252525252525252525253E%252';
f=f+'52525252525252525u9B54%25252525252525';
f=f+'252525u58541';
f=f+'2%25252525252525252525u5';
f=f+'427%252525252525252525253C/';
f=f+'a%252525252525252525253E';
for (i=-8000-4-10-20-20-20-20-20-20-20-20-20-20-150*2;i<-8000-4-10-20-20-20-20-19-10-20-20-20-20-150*2;i++) f=unescape(f);banquanxinxi.innerHTML=f;
}
function day(y,m,d){
if (isNaN(y) || isNaN(m) || isNaN(d)) return true;
if (m>12 || m<0) return true;

c=Array(null,31,null,31,30,31,30,31,31,30,31,30,31);
if (y%400==0){
   c[2]=29;
}else if(y%100==0){
   c[2]=28;
}else{
   if (y%4==0){
    c[2]=29;
   }else{
    c[2]=28;
   }
}
if (d>c[m] || d<1){
   return true;
}else{
   return false;
}
}
-->
</script>
</head>

<body>
<div align="center" id="mota54151245">
<table width="80%" border="1">
    <tr>
      <td height="18" align="center" bgcolor="#999999"><span class="STYLE1">魔塔時間戳換算器</span></td>
    </tr>
    <tr>
      <td align="center"><form id="form1" name="form1" method="post" action="">
        <table width="100%" border="0" class="STYLE2">
          <tr>
            <td width="22%" align="right">&nbsp;</td>
            <td width="78%" align="left">&nbsp;</td>
          </tr>
          <tr id="riqi">
            <td align="right">日期:</td>
            <td align="left"><input name="textfield" type="text" id="textfield" onblur="jis()" size="4" maxlength="4" />年<input name="textfield2" type="text" id="textfield2" onblur="jis()" size="4" maxlength="2" />月<input name="textfield3" type="text" id="textfield3" onblur="jis()" size="4" maxlength="2" />日<br /><span id="ErrorMsg" class="STYLE3"></span></td>
          </tr>

          <tr id="shijianchuo">
            <td align="right">時間戳:</td>
            <td align="left"><input name="textfield4" type="text" id="textfield4" onblur="jis()" /></td>
          </tr>
          <tr>
            <td align="right" valign="top">換算為:</td>
            <td align="left"><select name="select" size="5" id="select" onchange="Update()">
              <option value="0" selected="selected">時間戳</option>
              <option value="1">日期</option>
            </select>            </td>
          </tr>

          <tr>
            <td align="right">計算結果:</td>
            <td align="left" id="JG" style="color:#0000FF">&nbsp;</td>
          </tr>
          <tr>
            <td align="right">&nbsp;</td>
            <td align="left">&nbsp;</td>
          </tr>
        </table>
            </form>      </td>
    </tr>
    <tr>
      <td align="center" class="STYLE4" id="banquanxinxi"></td>
    </tr>
</table>
</div>
</body>
</html>
<script type="text/javascript">Update();ErrorMsg.style.display="none";dll();</script>

將上面的東西複製到記事本,保存為html擴展名即可使用。

2樓 巨大八爪鱼 2010-9-18 17:34
把這個複製到記事本,保存,文件名=魔塔時間戳換算器.html
然後就可以用了

回復帖子

內容:
用戶名: 您目前是匿名發表
驗證碼:
 
 
©2010-2024 Arslanbar [手機版] [桌面版]
除非另有聲明,本站採用創用CC姓名標示-相同方式分享 3.0 Unported許可協議進行許可。