Skip to content

Instantly share code, notes, and snippets.

@mingtsay
Created November 23, 2011 12:59
Show Gist options
  • Save mingtsay/1388609 to your computer and use it in GitHub Desktop.
Save mingtsay/1388609 to your computer and use it in GitHub Desktop.
<html>
<center>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<title>註冊 - 網址方盒 - 為縮短網址而誕生的網站!!</title>
<script src="/js/jquery.js" type="text/javascript"></script>
<script src="/js/jquery.validate.js" type="text/javascript"></script>
<script src="/js/cmxforms.js" type="text/javascript"></script>
<script src="/js/load.js" type="text/javascript"></script>
<link rel="shortcut icon" href="/favicon.ico">
<link href="/css/style.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" type="text/css" media="screen" href="/css/screen.css" />
<script type="text/javascript">
$(document).ready(function(){
$("#register").click(function(){
var user = $("#user").val();
var pwd = $("#pwd").val();
var eml = $("#eml").val();
$.ajax({
type: "get",
url : "reg-chk",
dataType:'json',
data: 'un='+user+'&pw='+pwd+'&em='+eml,
success: function(json){
if(json.result == "OK"){
$('#result').html("註冊成功!!");
setTimeout("location.href='/'",1000);
}else if(json.result == "re"){
$('#result').html("此電子郵件已被註冊!!");
}else if(json.result == "ru"){
$('#result').html("此帳號已被註冊!!");
}else if(json.result == "ee"){
$('#result').html("電子郵件的格式不符!!");
}else if(json.result == "eu"){
$('#result').html("帳號的格式不符!!");
}else if(json.result == "ep"){
$('#result').html("密碼的格式不符!!");
}else if(json.result == "nu"){
$('#result').html("未填入帳號!!");
}else if(json.result == "ne"){
$('#result').html("未填入電子郵件!!");
}else if(json.result == "np"){
$('#result').html("未填入密碼!!");
}else if(json.result == "er"){
$('#result').html("無法註冊!!");
}else if(json.result == "es"){
$('#result').html("無法送出E-Mail!!");
}
}
});
OneClick(this);
});
$("#loading").ajaxStart(function(){
$(this).show();
}); $("#loading").ajaxStop(function(){
$(this).hide();
});
});
function OneClick(btn) {
btn.onclick = Function("return false;");
btn.disabled = true;
setTimeout(function(){btn.disabled = false;},3000);
return true;
}
function Event(n,e){
if(e == "true"){
document.getElementById(n.id).style.overflow="visible";
}else{
document.getElementById(n.id).style.overflow="hidden";
}
}
$(function(){
$(".menu li a").click(function(){
var _this=$(this);
if(_this.next("ul").length>0){
if(_this.next().is(":visible")){
_this.html(_this.html().replace("▼","►")).next().hide();
}else{
_this.html(_this.html().replace("►","▼")).next().show();
}
return false;
}
});
$("a").focus( function(){
$(this).blur();
});
});
</script>
</head>
<body>
<ul class="menu">
<li>
<a href="#">►Language</a>
<ul class="submenu">
<li><a href="/lang:tw">繁體中文</a></li>
<li><a href="/lang:en">English</a></li>
<li><a href="/lang:cn">简体中文</a></li>
<!--li><a href="/lang:jp">日本語</a></li-->
</ul>
</li>
</ul>
<br />
<div id="divLoading">
<img src="/image/loader.gif" style="vertical-align:middle;padding:6px" />
網頁載入中...
</div>
<div style="width: 35%;border:1px dashed gray;height: 16%;">
<div align="left"><h3>說明:</h3></div>
<p>1. 帳號必為大於2小於10,可使用英文大小寫、數字、-、_</p>
<p>2. 密碼必為大於5小於10,可使用英文大小寫、數字、-、_</p>
<p>3. 由於本系統會寄出E-Mail驗證,請使用真實的E-Mail</p>
</div>
<div id="result" style="width: 35%;color:red;border:1px dashed red;height: 2%;">
<div id="loading" style="display:none"><img src="image/loading.gif">載入中...</div>
</div>
<form id="reg" action="" method="post">
<p><span>帳號:</span>
<input type="text" name="user" id="user" />
</p>
<p><span>密碼:</span>
<input type="password" name="pwd" id="pwd" />
</p>
<p><span>電子郵件:</span>
<input type="test" name="eml" id="eml" />
</p>
</form>
<button id="register">送出</button></body>
<div id="footer">
<a href="http://my.dot.tk/cgi-bin/amb/landing.dottk?nr=382274::9442844::1" target="_new" style="text-decoration: none">
<span style="color:#0f0;"><u><b>想跟我們一樣擁有 Dot TK 的超短域名嗎??</b></u></span></a>
</div>
</center>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment