Created
August 25, 2011 02:35
-
-
Save flying19880517/1169838 to your computer and use it in GitHub Desktop.
凉宫春日的消失 緊急逃離程式
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> | |
<HTML> | |
<HEAD> | |
<TITLE>緊急逃離程式</TITLE> | |
<META NAME="Generator" CONTENT="EditPlus"> | |
<META NAME="Author" CONTENT=""> | |
<META NAME="Keywords" CONTENT=""> | |
<META NAME="Description" CONTENT=""> | |
<style type="text/css"> | |
body{margin:16px;font: 16px; background-color:#000; color:#fff} | |
</style> | |
<script type="text/javascript"> | |
var typer={ | |
container : null, | |
speed : 100 , | |
innerHTML : null , | |
curpos : 0, | |
interval1 : null, | |
interval2 : null, | |
init : function(obj,speed){ | |
typer.container = obj; | |
if(speed)typer.speed = speed; | |
typer.start(); | |
}, | |
start : function(){ | |
typer.innerHTML = clearSpace(typer.container.innerHTML).toLowerCase(); | |
typer.container.innerHTML = ""; | |
typer.interval1 = setInterval("typer.type()",typer.speed); | |
}, | |
type : function(){ | |
if(typer.curpos<typer.innerHTML.length){ | |
if(typer.container.innerHTML.substring(typer.container.innerHTML.length-1)!="_"){ | |
typer.container.innerHTML +="_"; | |
}else{ | |
var tempStr = ""; | |
if(typer.innerHTML.length>=typer.curpos+4){ | |
if(typer.innerHTML.substring(typer.curpos,typer.curpos+4)=="</p>") { | |
tempStr="</p>"; | |
typer.curpos = typer.curpos+4; | |
}else if(typer.innerHTML.substring(typer.curpos,typer.curpos+4)=="<br>"){ | |
tempStr="<br>"; | |
typer.curpos = typer.curpos+4; | |
}else{ | |
if(typer.innerHTML.length>=typer.curpos+3 && typer.innerHTML.substring(typer.curpos,typer.curpos+3)=="<p>"){ | |
tempStr="<p>"; | |
typer.curpos = typer.curpos+3; | |
}else{ | |
tempStr=typer.innerHTML.substring(typer.curpos,typer.curpos+1); | |
typer.curpos++; | |
} | |
} | |
}else if(typer.innerHTML.length>=typer.curpos+3){ | |
if(typer.innerHTML.substring(typer.curpos,typer.curpos+3)=="<p>"){ | |
tempStr="<p>"; | |
typer.curpos = typer.curpos+3; | |
}else{ | |
tempStr=typer.innerHTML.substring(typer.curpos,typer.curpos+1); | |
typer.curpos++; | |
} | |
}else{ | |
tempStr=typer.innerHTML.substring(typer.curpos,typer.curpos+1); | |
typer.curpos++; | |
} | |
typer.container.innerHTML = typer.container.innerHTML.substring(0,typer.container.innerHTML.length-1)+tempStr; | |
} | |
}else{ | |
clearInterval(typer.interval1); | |
typer.interval2 = setInterval("typer.last()",typer.speed); | |
} | |
}, | |
last : function(){ | |
if(typer.container.innerHTML.substring(typer.container.innerHTML.length-1)!="_") | |
typer.container.innerHTML +="_"; | |
else | |
typer.container.innerHTML = typer.container.innerHTML.substring(0,typer.container.innerHTML.length-1); | |
} | |
} | |
function clearSpace(str){ | |
if(str!=""){ | |
str = str.replace(/^\s*/g,"").replace(/\s*$/g,""); | |
} | |
return str; | |
} | |
</script> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"></HEAD> | |
<BODY onLoad="typer.init(document.getElementById('view'))"> | |
<div id="view" style="font:16px; background-color:#000; color:#fff"><br> | |
YUKI.N> 當你看到這排文字時,我已經不是我了吧。 | |
<br> | |
<br> | |
YUKI.N> 這個訊息會出現,就表示你、我、涼宮春日、朝比奈實久瑠和古泉一樹應該就在這裡。 | |
<br> | |
<br> | |
YUKI.N> 這就是鑰匙。你已經找到解答了。 | |
<br> | |
<br> | |
YUKI.N> 這是緊急逃離程式。要啟動的話就按ENTER鍵,不啟動就選擇其他鍵。啟動之後,你會得到修正時空的機會。<br> | |
但是不保證一定成功。也不保證你能順利歸來。<br> | |
<br> | |
YUKI.N> 這個程式只能啟動一次。執行之後就會解除。選擇不執行的話,不啟動也會解除。READY?</div> | |
<script language=javascript> | |
document.onkeydown=nextpage | |
var bookpage="http://futaba.nagatoyuki.org/index2.htm" | |
var delpage="http://futaba.nagatoyuki.org/deleted.html" | |
function nextpage(event) | |
{ | |
event = event ? event : (window.event ? window.event : null); | |
if (event.keyCode==13) location=bookpage; | |
if (event.keyCode<=12) location=delpage; | |
if (event.keyCode>=14) location=delpage; | |
//同时按下多个键的事件情况 | |
} | |
</script> | |
</BODY> | |
</HTML> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment