復制代碼 代碼如下:
<script type="text/javascript">
var $= function(id)
{
return document.getElementById(id);
}
function check()
{
if( $('username').value == "" )
{
$('eusername').innerHTML='<p class="login_jjB"> 請輸入注冊用戶名!</p>';
return false;
}
else
{
$('eusername').innerHTML='';
}
if( $('passwd').value == "" )
{
$('epasswd').innerHTML='<p class="login_jjB"> 輸入密碼!</p>';
return false;
}
else
{
$('epasswd').innerHTML='';
}
if( $('passwd2').value != $('passwd').value )
{
$('epasswd2').innerHTML='<p class="login_jjB"> 兩次輸入密碼不一致!</p>';
return false;
}
else
{
$('epasswd2').innerHTML='';
}
if( $('email').value == "" )
{
$('eemail').innerHTML='<p class="login_jjB"> 郵箱地址!</p>';
return false;
}
else
{
$('eemail').innerHTML='';
}
if( $('vaild').value == "" )
{
$('evaild').innerHTML='<p class="login_jjB"> 請輸入右邊驗證碼!</p>';
return false;
}
else
{
$('evaild').innerHTML='';
}
}
</script>
<form name="registerform" id="registerform" method="POST" action="">
<input type="hidden" name="action" value="register">
<input type="hidden" name="user_type" value="1">
<ul><li><h1>用戶名:</h1>
<div class="login_jjA">
<span style="display:none;">
<select name="cityid" id="cityid" style="width:100px;" onblur="changelocation(document.registerform.cityid.options[document.registerform.cityid.selectedIndex].value)">
<option value="">--公司不限--</option>
<option value="2">--杭州捨易房地產代理有限公司--</option>
</select>
<select name="cityareaid" style="width:100px;" id="cityareaid">
<option value="0">--不限門店--</option>
</select>
</span>
<input name="username" id="username" type="text" class="jinru_in" value="" onblur="check();" onclick="check();" /></div>
<div id="eusername"></div>
</li>
<li><h1>密碼:</h1>
<div class="login_jjA"><input name="passwd" type="password" id="passwd" class="jinru_in" onblur="check();" onclick="check();" /></div>
<div id="epasswd"></div>
</li>
<li><h1>確認密碼:</h1>
<div class="login_jjA"><input name="passwd2" type="password" id="passwd2" class="jinru_in" onblur="check();" onclick="check();" /></div>
<div id="epasswd2"></div>
</li>
<li><h1>郵箱地址:</h1>
<div class="login_jjA"><input name="email" type="text" size="30" id="email" value="" class="jinru_in" onblur="check();" onclick="check();" /></div>
<div id="eemail"></div>
</li>
<li><h1>驗證碼:</h1>
<div class="login_jjA">
<input name="vaild" type="text" class="inlen" id="vaild" onblur="check();" onclick="check();" size="5" /><img src="/valid.php" /></div>
<div id="ever"></div>
</li>
<li style="height:35px;"><h1> </h1>
<div class="jinruD"><input value=" " type="submit" onclick="javascript:return check();" class="login_jj_btn"/></div>
</li>
</ul>
</form>