<?php
include_once('include/config.inc.php');
?>
<html>
<head>
<script language="javascript">
var xmlhttp = false;
var currentPos = null;
//开始初始化XMLHttpRequest对象
if(window.XMLHttpRequest)
{
//Mozilla 浏览器
xmlhttp = new XMLHttpRequest();
if (xmlhttp.overrideMimeType) {//设置MiME类别
xmlhttp.overrideMimeType('text/xml');
}
}
else if (window.ActiveXObject)
{
// IE浏览器
try {
xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
} catch (e) {}
}
}
function send_request(url, data)
{
//初始化、指定处理函数、发送请求的函数
if (!xmlhttp) { // 异常,创建对象实例失败
window.alert("不能创建XMLHttpRequest对象实例.");
return false;
}
// 确定发送请求的方式和URL以及是否同步执行下段代码
xmlhttp.open("POST", url, true);
xmlhttp.onreadystatechange = processRequest;
xmlhttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
xmlhttp.send("uname=" + data);
}
// 处理返回信息的函数
function processRequest()
{
if (xmlhttp.readyState == 4) { // 判断对象状态
if (xmlhttp.status == 200) { // 信息已经成功返回,开始处理信息
alert(xmlhttp.responseText);
} else { //页面不正常
alert("您所请求的页面有异常。");
}
}
}
function userCheck()
{
var f = document.form_zhuce;
var uname =document.getElementById("uname").innerhtml;
if(username=="") {
window.alert("用户名不能为空。");
document.getElementById("uname").innerhtml.focus();
return false;
}
else {
send_request('register.php', uname);
}
}
</script>
<title><?php echo $siteName ?>--用户注册</title>
<link href="css/global.css" rel="stylesheet" type="text/css" media="screen">
<meta http-equiv="Content-Type" c></head>
<body>
<form action="register.php" name="form_zhuce" method="post">
<div id="zhuceheader">
<div><h3>用户注册</h3></div>
<div class="zhuce">用 户 名:<input type="text" name="uname" id="uname" size="20">*此项必须填写<input type="button" value="用户名唯一性检验"></div><br>
<div class="zhuce">密 码:<input type="password" name="pass1" id="pass1" size="=20">*此项必须填写</div><br>
<div class="zhuce">确认密码:<input type="password" name="pass2" id="pass2" size="=20">*此项必须填写</div><br>
<div class="zhuce">性 别:
<input type="text" name="sex" id="sex" size="8"></div><br>
<div class="zhuce">真实姓名:<input type="text" name="name" id="name" size="20"></div><br>
<div class="zhuce">年 龄:<input type="text" name="age" id="age"></div><br>
<div class="zhuce">身份证号:<input type="text" name="identnumber" id="identnuber"></div><br>
<div class="zhuce">手机号码:<input type="text" name="mobile" id="mobile"></div><br>
<div class="zhuce">电话号码:<input type="text" name="telnumber" id="telnumber"></div><br>
<div class="zhuce">家庭住址:<input type="text" name="address" id="address"></div><br>
<div class="zhuce"> <span><input type="submit" name="submit" id="submit" value="注册"></span> <span><input type="reset" name="reset" id="reset" value="重置"></div>
</div>
</form>
</body>
</html>