Skip to content

Commit

Permalink
仿命令行http错误码返回页
Browse files Browse the repository at this point in the history
  • Loading branch information
maicong committed May 16, 2014
1 parent 4e083d9 commit 545375a
Show file tree
Hide file tree
Showing 9 changed files with 576 additions and 0 deletions.
64 changes: 64 additions & 0 deletions 400.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>正在连接服务器...</title>
<style type="text/css">
::-moz-selection { background: #fff; text-shadow: none; }
::selection { background: #fff; text-shadow: none; }
body { font-family: cursive, NSimSun; background: #000; color: #C0C0C0; font-size: 12pt; }
#errormsg { display: none }
#blink { display: inline; color: #0F0; }
</style>

</head>
<body>
<div id="echoerror"></div>
<div id="errormsg">
正在向服务器发起请求....<br>
服务器无法理解此请求<br>
正在重试#1....<br>
服务器无法理解此请求 #1<br>
正在重试#2....<br>
服务器无法理解此请求 #2<br>
正在重试#3....<br>
服务器无法理解此请求 #3<br>
失败, 请求出错
</div>
<script type="text/javascript">
var charIndex = -1;
var stringLength = 0;
var inputText;
function writeContent(){
inputText = document.getElementById('errormsg').innerHTML;
if(charIndex==-1){
charIndex = 0;
stringLength = inputText.length;
}
var initString = document.getElementById('echoerror').innerHTML;
initString = initString.replace(/<span.*$/gi,"");

var theChar = inputText.charAt(charIndex);
var nextFourChars = inputText.substr(charIndex,4);
if(nextFourChars=="...."){
time = 3000;
}else{
time = 50;
}
if(nextFourChars=='<br>'){
theChar = '<br>';
charIndex+=3;
}
initString = initString + theChar + "<span id='blink'>▌</span>";
document.getElementById('echoerror').innerHTML = initString;
charIndex = charIndex/1 +1;
if(charIndex<=stringLength){
setTimeout('writeContent(false)',time);
}else{
document.title = "请求出错";
}
}
writeContent();
</script>
</body>
</html>
64 changes: 64 additions & 0 deletions 401.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>正在连接服务器...</title>
<style type="text/css">
::-moz-selection { background: #fff; text-shadow: none; }
::selection { background: #fff; text-shadow: none; }
body { font-family: cursive, NSimSun; background: #000; color: #C0C0C0; font-size: 12pt; }
#errormsg { display: none }
#blink { display: inline; color: #0F0; }
</style>

</head>
<body>
<div id="echoerror"></div>
<div id="errormsg">
正在向服务器发起请求....<br>
服务器拒绝未授权的请求<br>
正在重试#1....<br>
服务器拒绝未授权的请求 #1<br>
正在重试#2....<br>
服务器拒绝未授权的请求 #2<br>
正在重试#3....<br>
服务器拒绝未授权的请求 #3<br>
失败, 未授权
</div>
<script type="text/javascript">
var charIndex = -1;
var stringLength = 0;
var inputText;
function writeContent(){
inputText = document.getElementById('errormsg').innerHTML;
if(charIndex==-1){
charIndex = 0;
stringLength = inputText.length;
}
var initString = document.getElementById('echoerror').innerHTML;
initString = initString.replace(/<span.*$/gi,"");

var theChar = inputText.charAt(charIndex);
var nextFourChars = inputText.substr(charIndex,4);
if(nextFourChars=="...."){
time = 3000;
}else{
time = 50;
}
if(nextFourChars=='<br>'){
theChar = '<br>';
charIndex+=3;
}
initString = initString + theChar + "<span id='blink'>▌</span>";
document.getElementById('echoerror').innerHTML = initString;
charIndex = charIndex/1 +1;
if(charIndex<=stringLength){
setTimeout('writeContent(false)',time);
}else{
document.title = "未授权";
}
}
writeContent();
</script>
</body>
</html>
64 changes: 64 additions & 0 deletions 403.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>正在连接服务器...</title>
<style type="text/css">
::-moz-selection { background: #fff; text-shadow: none; }
::selection { background: #fff; text-shadow: none; }
body { font-family: cursive, NSimSun; background: #000; color: #C0C0C0; font-size: 12pt; }
#errormsg { display: none }
#blink { display: inline; color: #0F0; }
</style>

</head>
<body>
<div id="echoerror"></div>
<div id="errormsg">
正在向服务器发起请求....<br>
服务器禁止了此次请求<br>
正在重试#1....<br>
服务器禁止了此次请求 #1<br>
正在重试#2....<br>
服务器禁止了此次请求 #2<br>
正在重试#3....<br>
服务器禁止了此次请求 #3<br>
失败, 禁止访问
</div>
<script type="text/javascript">
var charIndex = -1;
var stringLength = 0;
var inputText;
function writeContent(){
inputText = document.getElementById('errormsg').innerHTML;
if(charIndex==-1){
charIndex = 0;
stringLength = inputText.length;
}
var initString = document.getElementById('echoerror').innerHTML;
initString = initString.replace(/<span.*$/gi,"");

var theChar = inputText.charAt(charIndex);
var nextFourChars = inputText.substr(charIndex,4);
if(nextFourChars=="...."){
time = 3000;
}else{
time = 50;
}
if(nextFourChars=='<br>'){
theChar = '<br>';
charIndex+=3;
}
initString = initString + theChar + "<span id='blink'>▌</span>";
document.getElementById('echoerror').innerHTML = initString;
charIndex = charIndex/1 +1;
if(charIndex<=stringLength){
setTimeout('writeContent(false)',time);
}else{
document.title = "禁止访问";
}
}
writeContent();
</script>
</body>
</html>
64 changes: 64 additions & 0 deletions 404.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>正在连接服务器...</title>
<style type="text/css">
::-moz-selection { background: #fff; text-shadow: none; }
::selection { background: #fff; text-shadow: none; }
body { font-family: cursive, NSimSun; background: #000; color: #C0C0C0; font-size: 12pt; }
#errormsg { display: none }
#blink { display: inline; color: #0F0; }
</style>

</head>
<body>
<div id="echoerror"></div>
<div id="errormsg">
正在向服务器发起请求....<br>
服务器找不到您所请求的文件或脚本<br>
正在重试#1....<br>
服务器找不到您所请求的文件或脚本 #1<br>
正在重试#2....<br>
服务器找不到您所请求的文件或脚本 #2<br>
正在重试#3....<br>
服务器找不到您所请求的文件或脚本 #3<br>
失败, 未找到
</div>
<script type="text/javascript">
var charIndex = -1;
var stringLength = 0;
var inputText;
function writeContent(){
inputText = document.getElementById('errormsg').innerHTML;
if(charIndex==-1){
charIndex = 0;
stringLength = inputText.length;
}
var initString = document.getElementById('echoerror').innerHTML;
initString = initString.replace(/<span.*$/gi,"");

var theChar = inputText.charAt(charIndex);
var nextFourChars = inputText.substr(charIndex,4);
if(nextFourChars=="...."){
time = 3000;
}else{
time = 50;
}
if(nextFourChars=='<br>'){
theChar = '<br>';
charIndex+=3;
}
initString = initString + theChar + "<span id='blink'>▌</span>";
document.getElementById('echoerror').innerHTML = initString;
charIndex = charIndex/1 +1;
if(charIndex<=stringLength){
setTimeout('writeContent(false)',time);
}else{
document.title = "未找到";
}
}
writeContent();
</script>
</body>
</html>
64 changes: 64 additions & 0 deletions 405.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>正在连接服务器...</title>
<style type="text/css">
::-moz-selection { background: #fff; text-shadow: none; }
::selection { background: #fff; text-shadow: none; }
body { font-family: cursive, NSimSun; background: #000; color: #C0C0C0; font-size: 12pt; }
#errormsg { display: none }
#blink { display: inline; color: #0F0; }
</style>

</head>
<body>
<div id="echoerror"></div>
<div id="errormsg">
正在向服务器发起请求....<br>
服务器不允许请求行中所指定的方法<br>
正在重试#1....<br>
服务器不允许请求行中所指定的方法 #1<br>
正在重试#2....<br>
服务器不允许请求行中所指定的方法 #2<br>
正在重试#3....<br>
服务器不允许请求行中所指定的方法 #3<br>
失败, 不允许此方法
</div>
<script type="text/javascript">
var charIndex = -1;
var stringLength = 0;
var inputText;
function writeContent(){
inputText = document.getElementById('errormsg').innerHTML;
if(charIndex==-1){
charIndex = 0;
stringLength = inputText.length;
}
var initString = document.getElementById('echoerror').innerHTML;
initString = initString.replace(/<span.*$/gi,"");

var theChar = inputText.charAt(charIndex);
var nextFourChars = inputText.substr(charIndex,4);
if(nextFourChars=="...."){
time = 3000;
}else{
time = 50;
}
if(nextFourChars=='<br>'){
theChar = '<br>';
charIndex+=3;
}
initString = initString + theChar + "<span id='blink'>▌</span>";
document.getElementById('echoerror').innerHTML = initString;
charIndex = charIndex/1 +1;
if(charIndex<=stringLength){
setTimeout('writeContent(false)',time);
}else{
document.title = "不允许此方法";
}
}
writeContent();
</script>
</body>
</html>
64 changes: 64 additions & 0 deletions 500.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>正在连接服务器...</title>
<style type="text/css">
::-moz-selection { background: #fff; text-shadow: none; }
::selection { background: #fff; text-shadow: none; }
body { font-family: cursive, NSimSun; background: #000; color: #C0C0C0; font-size: 12pt; }
#errormsg { display: none }
#blink { display: inline; color: #0F0; }
</style>

</head>
<body>
<div id="echoerror"></div>
<div id="errormsg">
正在向服务器发起请求....<br>
服务器遇到错误不能完成该请求<br>
正在重试#1....<br>
服务器遇到错误不能完成该请求 #1<br>
正在重试#2....<br>
服务器遇到错误不能完成该请求 #2<br>
正在重试#3....<br>
服务器遇到错误不能完成该请求 #3<br>
失败, 内部服务器错误
</div>
<script type="text/javascript">
var charIndex = -1;
var stringLength = 0;
var inputText;
function writeContent(){
inputText = document.getElementById('errormsg').innerHTML;
if(charIndex==-1){
charIndex = 0;
stringLength = inputText.length;
}
var initString = document.getElementById('echoerror').innerHTML;
initString = initString.replace(/<span.*$/gi,"");

var theChar = inputText.charAt(charIndex);
var nextFourChars = inputText.substr(charIndex,4);
if(nextFourChars=="...."){
time = 3000;
}else{
time = 50;
}
if(nextFourChars=='<br>'){
theChar = '<br>';
charIndex+=3;
}
initString = initString + theChar + "<span id='blink'>▌</span>";
document.getElementById('echoerror').innerHTML = initString;
charIndex = charIndex/1 +1;
if(charIndex<=stringLength){
setTimeout('writeContent(false)',time);
}else{
document.title = "内部服务器错误";
}
}
writeContent();
</script>
</body>
</html>
Loading

0 comments on commit 545375a

Please sign in to comment.