急!请大家帮忙看一下,报下面的错误是什么问题

fogheart 2008-06-04 12:13:04
用户注册的一个程序,在输入用户名之后,只要超过6个字符,总是报这样的错误信息:错误信息: Internal Server Error!
我不懂ajax,不知道这样的错误是由什么原因造成的,请大侠们帮忙看一下,多谢多谢!
程序代码是asp+ajax的
用户名输入的要求是:请您以6~16位的英文字母、数字或下划线进行组合,如:6699_xz
...全文
233 20 打赏 收藏 转发到动态 举报
写回复
用AI写文章
20 条回复
切换为时间正序
请发表友善的回复…
发表回复
fogheart 2008-06-05
  • 打赏
  • 举报
回复
出错信息的部分已经设置了,还是显示 错误信息: Internal Server Error!

我把
With adoComm
.ActiveConnection = Conn
.CommandType = 4
.CommandText = "checkuser_reg"
'try
.Parameters.Append adoComm.CreateParameter("@name", adVarChar, adParaminput, 20,accounts)
' .Parameters.Item("@username").Value = accounts
.Execute
End With

换上去,用checkusername.asp?accounts=??查看,报错的变成
.Parameters.Append adoComm.CreateParameter("@name", adVarChar, adParaminput, 20,accounts)
这一行,
ADODB.Command 错误 '800a0bb9'

参数类型不正确,或不在可以接受的范围之内,或与其他参数冲突
用原来的代码,代参数访问,就是上面显示的那种错误信息,真晕啊
fogheart 2008-06-05
  • 打赏
  • 举报
回复
我按后面直接跟的参数方式,显示的是
ADODB.Parameters 错误 '800a0cc1'

在对应所需名称或序数的集合中,未找到项目。

/checkusername.asp,行 10
就是还是这行 .Parameters.Item("@username").Value = accounts
fogheart 2008-06-05
  • 打赏
  • 举报
回复
结帐结帐,真是晕了,存储过程出问题,谢谢大家的帮忙!
xuStanly 2008-06-04
  • 打赏
  • 举报
回复
[Quote=引用 2 楼 fogheart 的回复:]
好晕,我分开贴吧
[/Quote]
确实晕,没头没尾。
fogheart 2008-06-04
  • 打赏
  • 举报
回复

<tr>
<td height="30"> </td>
<td height="30">形象</td>
<td height="30"><img src="user/face/1.jpg" name="headimg" border="0" />
<select name="pic" onchange="document.headimg.src='user/face/'+this.value+'.jpg'" onfocus="showsub(6,7);">
<option value=1>1</option><option value=2>2</option><option value=3>3</option><option value=4>4</option><option value=5>5</option><option
</select></td>
</tr>
<tr>
<td height="30"> </td>
<td height="30">验证码</td>
<td height="30"><input name="reg_rndnumber" type="text" class="c1" onfocus="showsub(7,7);" size="8"/> <img src='check/rndnumber.asp' align='absmiddle'></td>
</tr>
</table> </td>
<td width="6" background="images/reg_bg_2.jpg"></td>
<td width="20"> </td>
</tr>
<tr>
<td height="6"></td>
<td width="6" height="6" background="images/reg_bg_6.jpg"></td>
<td width="300" height="6" background="images/reg_bg_4.jpg"></td>
<td width="6" height="6" background="images/reg_bg_5.jpg"></td>
<td width="20"></td>
<td width="152" height="6"></td>
</tr>
<tr>
<td height="25"></td>
<td height="30"></td>
<td height="30"><input type="checkbox" name="readed" value="checkbox" checked="checked" />
我已阅读并同意《<a href="about.asp?id=3" class="uline">用户服务条款</a>》</td>
<td height="25" colspan="3" align="center"></td>
</tr>
<tr>
<td height="25"></td>
<td height="25"></td>
<td height="25" align="right"><input name="image" type="image" src="images/reg_.jpg" width="78" height="29" border="0" /></td>
<td height="25" colspan="3" align="center"></td>
</tr>
</table>
<br>
<p> </p>
</form></td>
</tr>
<tr>
<td colspan="2"> </td>
</tr>
</table></td>
</tr>
<tr>
<td align="center"> </td>
</tr>
<tr>
<td> </td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<script src="foot.js"></script>
</table>
fogheart 2008-06-04
  • 打赏
  • 举报
回复
好晕,我分开贴吧

<body onload="init();">
<table width="760" border="0" cellspacing="0" cellpadding="0" align="center">
<script language="javascript">
var fixed_menu=3;

function showsub(tabid,tabnumber)
{
for (i = 1;i<=tabnumber;i++)
{
document.getElementById("tab"+i).style.display = "none";
}
document.getElementById("tab"+tabid).style.display = "";

}

function selectimg(image,id){
var url=document.formRegStep1Main.pic.value
document.headimg.src=url;

}

</script>
<script language="javascript">
// JavaScript Document
function init(){

document.getElementById("menu"+fixed_menu).style.backgroundImage = "url(images/menu_bg_1.gif)";
if (fixed_menu==1){document.getElementById("menuleft").style.backgroundImage = "url(images/menu_left_1.gif)";}
if (fixed_menu==6){document.getElementById("menuright").style.backgroundImage = "url(images/menu_right_1.gif)";}
}

function changebg(elNo)
{
if (elNo != fixed_menu)
{
document.getElementById("menu"+elNo).style.backgroundImage = "url(images/menu_bg_1.gif)";
if (elNo==1){document.getElementById("menuleft").style.backgroundImage = "url(images/menu_left_1.gif)";}
if (elNo==6){document.getElementById("menuright").style.backgroundImage = "url(images/menu_right_1.gif)";}
}

}
function rebg(elNo)
{
if (elNo != fixed_menu)
{
if (elNo!=fixed_menu){document.getElementById("menu"+elNo).style.backgroundImage = "url(images/menu_bg_0.gif)";}
if (elNo==1){document.getElementById("menuleft").style.backgroundImage = "url(images/menu_left_0.gif)";}
if (elNo==6){document.getElementById("menuright").style.backgroundImage = "url(images/menu_right_0.gif)";}
}
}
</script>
<tr>
<td height=110 valign='bottom'><table width=100% height='80' border=0 cellspacing=0 cellpadding=0>
<tr>
<td width=260 align='center' valign='middle'><img src=images/logo_1.jpg width=186 height=64 />

</td><td width=500 valign=bottom align=left>
<table width=460 border=0 cellpadding=0 cellspacing=0 align='center'>
<tr><td height=18 valign=middle align='right'><object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0' width='456' height='56'>
<param name='movie' value='banner.swf'>
<param name='quality' value='high'>
<embed src='banner.swf' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='456' height='56'></embed>
</object></td>
</tr>
<tr>
<td height=18 valign=middle align='right'><img src=images/button_1.jpg width=18 height=18 />
<a href='http://wpa.qq.com/msgrd?V=1&Uin=100316699&Site=鑫众游戏&Menu=yes' target='blank' class='hui' title='请先打开您的QQ'>客服</a>
<img src=images/button_2.jpg width=18 height=18 />
<a href='game.asp' class='hui'>下载</a>
<img src=images/button_3.jpg width=18 height=18 />
<a href='newslist.asp' class='hui'>资讯</a>
<img src=images/button_4.jpg width=18 height=18 />
<a href='http://www.xz6699.com/buysaika.asp' class='hui'>冲值卡</a>       </td>
</tr>
</table></td>
</table></td>
</tr>
</tr>
<TR>

<TD vAlign='center' align='middle' width='100%' class='yellow'><marquee width='300'>即时公告</marquee></TD>
</TR>
<tr>
<td><table border=0 align=center cellpadding=0 cellspacing=0>
<tr height=27>
<td id=menuleft width=10 background=images/menu_left_0.gif></td>
<td width=105 id=menu1 align=center background=images/menu_bg_0.gif onmouseover=changebg(1); onmouseout=rebg(1);><a href='/'><img src=images/menu_1.gif width=34 height=14 border=0/></a></td>
<td width=2 align=center background=images/menu_bg.gif></td>
<td width=102 id=menu2 align=center background=images/menu_bg_0.gif onmouseover=changebg(2); onmouseout=rebg(2);><a href='game.asp'><img src=images/menu_2.gif width=35 height=14 border=0/></a></td>
<td width=2 align=center background=images/menu_bg.gif></td>
<td width=102 id=menu3 align=center background=images/menu_bg_0.gif onmouseover=changebg(3); onmouseout=rebg(3);><a href='service.asp'><img src=images/menu_3.gif width=60 height=14 border=0/></a></td>
<td width=2 align=center background=images/menu_bg.gif></td>
<td width=102 id=menu4 align=center background=images/menu_bg_0.gif onmouseover=changebg(4); onmouseout=rebg(4);><a href='/cj_time.asp'><img src=images/menu_4.gif width=60 height=14 border='0'/></a></td>
<td width=2 align=center background=images/menu_bg.gif></td>
<td width=102 id=menu5 align=center background=images/menu_bg_0.gif onmouseover=changebg(5); onmouseout=rebg(5);><a href='c_chongzhi.asp'><img src=images/menu_5.gif width=60 height=14 border='0' /></a></td>
<td width=2 align=center background=images/menu_bg.gif></td>
<td width=102 id=menu7 align=center background=images/menu_bg_0.gif onmouseover=changebg(7); onmouseout=rebg(7);><a href='dhprize.asp'><img src=images/menu_7.gif width=60 height=14 border='0' /></a></td>
<td width=2 align=center background=images/menu_bg.gif></td>
<td width=105 id=menu6 align=center background=images/menu_bg_0.gif onmouseover=changebg(6); onmouseout=rebg(6);><a href='Netunion.asp'><img src=images/menu_6.gif width=60 height=14 border='0' /></a></td>
<td width=10 id=menuright align=center background=images/menu_right_0.gif> </td>
</tr>
</table></td>
</tr>
familyX 2008-06-04
  • 打赏
  • 举报
回复
代码贴出来看下
myvicy 2008-06-04
  • 打赏
  • 举报
回复
出现Internal Server Error错误,如何查看到底是什么地方出现了错误?

问题解答:
为了保护您的站点安全及隐私,系统默认是不想将您站点的错误信息显示给浏览着的。但您需要进行在线调试的时候可以尝试如下操作:

1. 关闭自定义错误文档
Plesk控制面板 -> 您的站点 -> Web 目录 -> 错误文档 -> 找到并点击"500 内部服务器错误" 及 "500.100 ASP内部服务器错误" -> 将其类型修改为"默认"

2. 关闭IE浏览器的“显示友好HTTP错误消息”功能
IE浏览器 -> 工具 -> Internet 选项 -> 高级 -> 取消“显示友好HTTP错误消息”前面的对勾 -> 点击“确定”

然后您再浏览刚才出错的页面就可以看到详细的错误信息了。
Go 旅城通票 2008-06-04
  • 打赏
  • 举报
回复
With adoComm
.ActiveConnection = Conn
.CommandType = 4
.CommandText = "checkuser_reg"
'try
.Parameters.Append adoComm.CreateParameter("@name", adVarChar, adParaminput, 20,accounts)
' .Parameters.Item("@username").Value = accounts
.Execute
End With
Go 旅城通票 2008-06-04
  • 打赏
  • 举报
回复
你参数名称是不是搞错了..也没有@backresult参数啊
Go 旅城通票 2008-06-04
  • 打赏
  • 举报
回复
你先直接访问checkusername.asp?accounts=xxxxxxxxxx

看提示什么错误,而且你注意你的ajax指定了post方法,所以要用request("accounts")或者request.form("accounts")来获取,用request.querystring("accounts")这样得到的是空的,检查你nosql是否直接使用了
replace(变量,"'","''")这样的函数,如果没判断是否为null直接这样使用会出错
fogheart 2008-06-04
  • 打赏
  • 举报
回复
checkusername.asp 文件,



<!--#include file="CONN.ASP"-->
<%
accounts=nosql("accounts")
Set adoComm = CreateObject("ADODB.Command")
With adoComm
.ActiveConnection = Conn
.CommandType = 4
.CommandText = "checkuser_reg"
.Parameters.Item("@username").Value = accounts
.Execute
End With

if adocomm.Parameters.Item("@backresult") = 1 then
result="0"
Else
result="1"
End if
set adocomm=nothing
response.write result

%>


存储过程checkuser_reg

CREATE PROCEDURE checkuser_reg
@name NVARCHAR(20)
AS
BEGIN
SELECT * FROM users WHERE Name=@name
END
GO
Go 旅城通票 2008-06-04
  • 打赏
  • 举报
回复
你是在用ajax检测用户名时出错??那应该是checkusername.asp有问题,你上面帖的asp代码不是checkusername.asp的啊....

如果你也是用存储过程来验证用户名是否存在的话,检查你的存储过程是否限制了帐号的字符个数
fogheart 2008-06-04
  • 打赏
  • 举报
回复
regvalid.js文件

function checkAccounts ( me ){
if( ! isPassword( me.value ) || !/[A-Za-z0-9]/.test( me.value )){ _( "chkaccounts" ).style.display = "";
_( "chkaccountsval" ).style.display = "none";
}
else {
_( "chkaccounts" ).style.display = "none";
_( "chkaccountsval" ).style.display = "";
validate(me.value, "reg_accounts" ,'chkaccountsvalstr')

}
}

var serverAddress = "checkusername.asp";
var cache = new Array();

function getHttpObject() {
var objType = false;
try {
objType = new ActiveXObject('Msxml2.XMLHTTP');
}
catch(e) {
try {
objType = new ActiveXObject('Microsoft.XMLHTTP');
}
catch(e) {
objType = new XMLHttpRequest();
}
}
return objType;
}

function getAJAX(postBody,messageID){
var theHttpRequest = getHttpObject();
theHttpRequest.onreadystatechange = function() {processAJAX(messageID);};
theHttpRequest.open("POST", serverAddress, true);
theHttpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
theHttpRequest.send(postBody);

function processAJAX(messageID){
if (theHttpRequest.readyState == 4) {
if (theHttpRequest.status == 200) {
var msgid=theHttpRequest.responseText
var msgstr
if (msgid==1)
{
msgstr="恭喜,帐号可用"
}
else
{
msgstr="帐号不可用,请选择其它帐号"
}

document.getElementById(messageID).innerHTML = msgstr;
setTimeout("validate();", 500);
}
else {

document.getElementById(messageID).innerHTML="<p>错误信息: " + theHttpRequest.statusText +"<\/p>";
}
}
}
}

function validate(inputValue, fieldID, messageID){
if (fieldID){
inputValue = encodeURIComponent(inputValue);
fieldID = encodeURIComponent(fieldID);
cache.push("accounts=" + inputValue + "&fieldID=" + fieldID);
// alter(inputValue);
}
if (cache.length > 0){
var cacheEntry = cache.shift();
getAJAX(cacheEntry,messageID);
}
}

function checkPWD( me ){
if( ! isPassword( me.value )) _( "chkPwd" ).style.display = "";
else {
_( "pwds" ).innerHTML = "<font color=black>密码安全程度:</font>"+checkStrong(me.value);
_( "chkPwdStr" ).style.display = "";
}
}
function isPassword( str ){
if (str.length < 6 || str.length > 16) return false;
var len;
var i;
len = 0;
for (i=0;i<str.length;i++){
if (str.charCodeAt(i)>255) return false;
}
return true;
}

function editpwd( me )

{
if (( me.value.length > 16 || me.value.length < 6) && me.value.length!=0) {
_( "chkPwd" ).style.display = "";
} else {
var len;
var i;
len = 0;
for (i=0;i<me.value.length;i++){
if (me.value.charCodeAt(i)>255){
_( "chkPwd" ).style.display = "";
return false;
}
}
}
}


function checkNumber( num ,max){
if( /^[0-9]+$/.test( num ) && num <=max)
return true;
else return false;
}
function birthPress(){
var k = window.event.keyCode;
if (k < 48 || k > 57)
window.event.keyCode = 0 ;
}
function confirmPwd( me ){
var oPassword = _( "password" );
if( ! ( me.value == oPassword.value ) ) _( "pwdConfirm" ).style.display = "";
}
function checkVerifyCode( me ){
if( me.value == "" || !( /^\w{6}$/.test( me.value ) ) || me.value.length != 6 ) _( "verifyConfirm" ).style.display = "";
}
function checkBirthday() {
if (_("year").value == "" || !checkNumber(_("month").value,12) || !checkNumber(_("date").value,31)){
_( "birthdayConfirm" ).style.display = "";
}
}
function isAnswer( answer ){
return /^[^%&]{2,20}$/.test( answer );
}
function checkGender(){
for( var i = 0; i < document.getElementsByName("gender").length; i++ ) {
if(document.getElementsByName("gender")[i].checked) return true;
}
return false;
}


function checknickname( customquestion )
{
var oCQ = _( 'nicknamestr' );
// showCQChk( "yes" );
if ( customquestion.value == null || customquestion.value == "" )
{
oCQ.innerHTML = "请填写昵称";
return;
}
if ( customquestion.length > 20 )
{
oCQ.innerHTML = "昵称应不超过20个字符";
return;
}
if(! /^[^%&]+$/.test( customquestion.value ) )
{
oCQ.innerHTML = "昵称中不能包含'%'和'&'这两个字符";
return;
}
_( 'chknickname' ).style.display = 'none';
// showCQChk( "no" );
}

function isMobile( mobile ){
return /^13\d{9}$/.test( mobile ) | /^15\d{9}$/.test( mobile );
}
function isAlt_email( alt_email ){
return ( /^[^@]+@[^@]+\.[^@]+$/.test( alt_email ) && alt_email.length<128 );
}
function checkAltEmail( me ){
if( ! isAlt_email( me.value ) ) _( "altConfirm" ).style.display = "";
}
function checkMobile( me ){
if( ! isMobile( me.value ) ) _( "mobileConfirm" ).style.display = "";
}
function checkAnswer( me ){
if( ! isAnswer( me.value ) ) _( "answerConfirm" ).style.display = "";
}
function _(id) {
return document.getElementById(id);
}



function CharMode(iN){
if (iN>=48 && iN <=57) //数字
return 1;
if (iN>=65 && iN <=90) //大写字母
return 2;
if (iN>=97 && iN <=122) //小写
return 4;
else
return 8; //特殊字符
}

//bitTotal函数
//计算出当前密码当中一共有多少种模式
function bitTotal(num){
modes=0;
for (i=0;i<4;i++){
if (num & 1) modes++;
num>>>=1;
}
return modes;
}

//checkStrong函数
//返回密码的强度级别
function checkStrong(sPW){
Modes=0;
for (i=0;i<sPW.length;i++){
//测试每一个字符的类别并统计一共有多少种模式.
Modes|=CharMode(sPW.charCodeAt(i));
}
switch(bitTotal(Modes)) {
case 1:
return "<font color='#FF0000'>弱</font>";
break;
case 2:
return "<font color='#FF9900'>中</font>";
break;
case 3:
return "<font color='#33CC00'>强</font>";
break;
default:
return "<font color='#FF0000'>弱</font>";
}
}


function fCheck(){
// if( !_("readed").checked ) {
// alert("您需要接受服务条款后才能注册!");
// _("readed").focus();
// return false;
// }


// if( ! isPassword( _("reg_accounts" ).value) || !/[A-Za-z0-9]/.test( _("reg_accounts" ).value))
// {
// alert("游戏帐号必须是6~16位的英文字母、数字或下划线的组合!");
// _("reg_accounts").select();
/// _("reg_accounts").focus();
// / return false;
// }

var nickname = _("nickname").value;
if ( nickname == null || nickname == "" ){
alert("请填写昵称");
_("nickname").select();
_("nickname").focus();
return false;
}
if ( nickname.length > 20 ){
alert("昵称应不超过20个字符");
_("nickname").select();
_("nickname").focus();
return false;
}
if(! /^[^%&]+$/.test( nickname ) ){
alert("昵称中不能包含'%'和'&'这两个字符");
_("nickname").select();
_("nickname").focus();
return false;
}

if (_("password").value != "")
{
if( ! isPassword( _("password").value ) || !/^[^%&]*$/.test( _("password").value )) {
alert("\请重新输入密码,密码由至少6个英文字母、数字、特殊字符等组成(不能包含'%'和'&'这两个字符) !");
_("password").select();
_("password").focus();
return false;
}
}

if( _("password_cf").value != _("password").value ) {
alert("\两次密码输入不一致 !");
_("password_cf").select();
_("password_cf").focus();
return false;
}


if(!isAlt_email(_("email").value)) {
alert("请正确填写邮箱!");
_("email").select();
_("email").focus();
return false;
}
}
Go 旅城通票 2008-06-04
  • 打赏
  • 举报
回复
regvalid.js这个也要贴出来,要不不知道你怎么使用ajax
fogheart 2008-06-04
  • 打赏
  • 举报
回复
上一个是reg.asp页面,这一个是提交处理页面reg_save.asp

<!--#include FILE="CONN.ASP"-->
<!--#include FILE="inc/md5.ASP"-->
<%
dim okmsg
okmsg=""
othermsg=""
accounts=nosql("reg_accounts")
nickname=nosql("nickname")
password=request("password")
email=nosql("email")
sex=nosql("sex")
pic=nosql("pic")
reg_rndnumber=nosql("reg_rndnumber")
automoney=0 '注册用户自动赠送U币数

Function ValidatePassword(strPassword)
if len(strPassword)>=6 and len(strPassword)<=16 then
ValidatePassword=true
else
ValidatePassword=false
end if
End Function

Function ValidateAccounts(strAccounts)
Dim re
Set re = new RegExp
re.IgnoreCase = false
re.global = false

'/[\W]/g
re.Pattern = "\w{6,16}"
ValidateAccounts = re.Test(strAccounts)
End Function


Function ValidateEmailAddr(strEmailAddr)
Dim re
Set re = new RegExp
re.pattern = "^[^@]+@[^@]+\.[^@]+$"
ValidateEmailAddr=re.Test(strEmailAddr)
end function

function validateNickname(strNickname)
Dim re
Set re = new RegExp
re.pattern = "^[^%&]+$"
validateNickname=re.Test(strNickname)

end function

function validateSex(strSex)
if strSex=0 or strSex=1 then
validateSex=true
exit function
end if
end function

function validatePic(strPic)
if IsNumeric(strPic) then
validatePic=true
exit function
end if
end function
dim errmsg
errmsg=""
sub valiStr()
'regip=Request.ServerVariables("REMOTE_ADDR")
'if regip="222.135.109.45" then
' errmsg="你的IP已经被管理员封闭。请联系管理员系统禁止注册!"
' exit sub
'end if
if ValidateAccounts(accounts)<>true then
errmsg="游戏帐号不合法,请重新填写!"
exit sub
end if

if ValidatePassword(Password)<>true then
errmsg="密码设定不合规定,请按要求填写!"
exit sub
end if

if ValidateEmailAddr(email)<>true then
errmsg="Email填写错误!"
exit sub
end if
if validateNickname(nickname)<>true then
errmsg="昵称填写错误"
exit sub
end if
if validateSex(Sex)<>true then
errmsg="性别"
exit sub
end if
if validatePic(Pic)<>true then
errmsg="形象填写错误"
exit sub
end if

if Session("CheckCode")="" then
errmsg="验证码过期!"
exit sub
elseif reg_rndnumber<>Session("CheckCode") then
errmsg="验证码填写错误~"
exit sub
end if

Set adoComm = CreateObject("ADODB.Command")
With adoComm
.ActiveConnection = Conn
.CommandType = 4
.CommandText = "checkuser_reg"
.Parameters.Item("@username").Value = accounts
.Execute
End With

if adocomm.Parameters.Item("@backresult")=1 then
errmsg="抱歉,此游戏帐号已被使用!请选择另一个!"
Set adoComm = Nothing
exit sub
end if

' if not rs.eof then
' errmsg="抱歉,此游戏帐号已被使用!请选择另一个!"
' rs.close
' set rs=nothing
' exit sub
' end if

password=md5(password)
'''''================添加用户开始
' 修改数据库 userID 数据类型=>自动编号 RegTM=>默认值 getdate()

With adoComm
.ActiveConnection = Conn
.CommandType = 4
.CommandText = "edituser"
.Parameters.Item("@userid").Value = 0
.Parameters.Item("@username").Value = accounts
.Parameters.Item("@scrname").Value = nickname
.Parameters.Item("@pass").Value = password
.Parameters.Item("@LogoID").Value = pic
.Parameters.Item("@Boy").Value = sex
.Parameters.Item("@LastLoginIP").Value = Request.ServerVariables("REMOTE_ADDR")
.Parameters.Item("@email").Value = email
.Execute
End With
set adocomm=nothing
' sql="insert into users([name],scrname,pass,webpass,LogoID,Boy,LastLoginIP,RegIP,email,money) values ('" & accounts & "','" & _
' nickname & "','" & password & "','" & password & "'," & pic & "," & sex & ",'" & Request.ServerVariables("REMOTE_ADDR") _
' & "','" & Request.ServerVariables("REMOTE_ADDR") & "','" & email & "'," & automoney & ")"
' conn.execute(sql)
session("CheckCode")=""

okmsg="注册成功!您现在可以进入游戏了。"

session("Uaccounts")=accounts

show="||||||7|6|5||4||3|2||||1|||||||"
if sex=1 then show="||||||14|13|12||11||10|9||||8|||||||"

Cookies_str=accounts & "!*" & nickname & "!*" & automoney & "!*0!*" & show

for i=1 to len(cookies_str)
str=str & AscW(left(right(cookies_str,i),1)) & "a"
next

response.Cookies("userinfo")=left(str,len(str)-1)

othermsg=othermsg & "<table width='263' border='0' cellspacing='1' align='center'>"
othermsg=othermsg & "<tr><td width='259'>您现在可以:</td></tr>"
othermsg=othermsg & "<tr><td nowrap>1、<a href='game.exe' class='blue'>点击此处下载安装游戏</a></td></tr>"
othermsg=othermsg & "<tr><td nowrap>2、<a href='editinfo.asp' class='blue'>点击此处“修改注册资料”</a></td></tr>"
othermsg=othermsg & "<tr><td nowrap>3、<a href='userinfo.asp' class='blue'>点击此处“填写/修改详细资料”</a></td></tr>"
othermsg=othermsg & "<tr><td nowrap>4、<a href='passprotect.asp' class='blue'>点击此处“填写密码保护和补充信息”</a></td></tr>"
othermsg=othermsg & "<tr><td nowrap>5、<a href='bbs\' class='blue'>点击此处“登录游戏论坛”</a></td></tr>"
othermsg=othermsg & "<tr><td nowrap>6、<a href='index.asp' class='blue'>点击此处关闭该页</a></td></tr>"
othermsg=othermsg & "</table>"


end sub

call valiStr()

if errmsg<>"" then
response.write "<script>alert('"&errmsg&"');"
response.write "location.href='javascript:history.go(-1)';</script>"
end if

if okmsg<>"" then
response.cookies("okmsg")=okmsg
response.cookies("othermsg")=othermsg
response.write "<script>location.href='viewresult.asp';</script>"
end if

%>
fogheart 2008-06-04
  • 打赏
  • 举报
回复
<!--#include FILE="CONN.ASP"-->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>用户注册</title>
</head>
<body onLoad="init();">
<table width="760" border="0" cellspacing="0" cellpadding="0" align="center">
<script language="javascript">
var fixed_menu=3;
function showsub(tabid,tabnumber){
for (i = 1;i<=tabnumber;i++) {
document.getElementById("tab"+i).style.display = "none";
}
document.getElementById("tab"+tabid).style.display = "";
}
function selectimg(image,id){
var url=document.formRegStep1Main.pic.value
document.headimg.src=url;
}
</script>
<!--#include FILE="head.asp"-->
<script src="regvalid.js"></script>
<tr>
<td><table width="537" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="537" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><form action="reg_save.asp" method="post" name="formRegStep1Main" onSubmit="return fCheck();">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><table width="82%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="6%" height="30"> </td>
<td width="33%" height="30">游戏帐号</td>
<td width="61%" height="30">
<input name="reg_accounts" type="text" size="16" onBlur="checkAccounts( this );" onfocus="_( 'chkaccounts' ).style.display = 'none';showsub(1,7);"/ class="c1"></td>
</tr>
<tr id="chkaccounts" style="display:none;">
<td height="20"> </td>
<td height="20"> </td>
<td height="20" class='red'>请按要求输入游戏帐号</td>
</tr>
<tr id="chkaccountsval" style="display:none;">
<td height="20"> </td>
<td height="20"> </td>
<td height="20" class="red" id="chkaccountsvalstr"><marquee behavior="alternate">...正在验证,请稍候...</marquee></td>
</tr>

<tr>
<td height="30"> </td>
<td height="30">昵称</td>
<td height="30"><input name="nickname" type="text" class="c1" id="nikcname" onfocus="_( 'chknickname' ).style.display = 'none';showsub(2,7);" onblur="_( 'chknickname' ).style.display = '';checknickname( this );" size="16" maxlength="19"/></td>
</tr>
<tr id="chknickname" style="display:none;">
<td height="20"> </td>
<td height="20"> </td>
<td height="20" class='red' id="nicknamestr">请按要求输入昵称</td>
</tr>
<tr>
<td height="30"> </td>
<td height="30">密码</td>
<td height="30"><input name="password" type="password" class="c1" onfocus="_( 'chkPwd' ).style.display = 'none';_( 'chkPwdStr' ).style.display = 'none';showsub(3,7)" onblur="checkPWD( this );" size="20"/></td>
</tr>
<tr id="chkPwd" style="display:none;">
<td height="20"> </td>
<td height="20"> </td>
<td height="20" class='red'>请按要求输入密码</td>
</tr>
<tr id="chkPwdStr" style="display:none;">
<td height="20"> </td>
<td height="20"> </td>
<td height="20" id="pwds" class='red'>密码安全程度:</td>
</tr>
<tr>
<td height="30"> </td>
<td height="30">密码确认</td>
<td height="30"><input name="password_cf" type="password" class="c1" onFocus="_( 'pwdConfirm' ).style.display = 'none';showsub(4,7);" onBlur="confirmPwd( this )" size="20"/></td>
</tr>
<tr id="pwdConfirm" style="display:none;">
<td height="20"> </td>
<td height="20"> </td>
<td height="20" class='red'>重新输入密码错误</td>
</tr>
<tr>
<td height="30"> </td>
<td height="30">电子信箱</td>
<td height="30"><input name="email" type="text" class="c1" id="email" onfocus="_( 'altConfirm' ).style.display = 'none';showsub(5,7);" onblur="checkAltEmail( this );" size="20" value="webmaster@xz6699.com"/></td>
</tr>
<tr id="altConfirm" style="display:none;">
<td height="20"> </td>
<td height="20"> </td>
<td height="20" class='red'>邮箱格式错误</td>
</tr>
<tr>
<td height="30"> </td>
<td height="30">性别</td>
<td height="30"><select name="sex">
<option value="1">男</option>
<option value="0">女</option>
</select> </td>
</tr>
<tr>
<td height="30"> </td>
<td height="30">形象</td>
<td height="30"><img src="user/face/1.jpg" name="headimg" border="0" />
<select name="pic" onChange="document.headimg.src='user/face/'+this.value+'.jpg'" onFocus="showsub(6,7);">
<%
for i=1 to 140
response.write("<option value="&i&">" & i & "</option>")
next
%>
</select></td>
</tr>
<tr>
<td height="30"> </td>
<td height="30">验证码</td>
<td height="30"><input name="reg_rndnumber" type="text" class="c1" onfocus="showsub(7,7);" size="8"/> <img src='check/rndnumber.asp' align='absmiddle'></td>
</tr>
</table></td>
</tr>
<tr>
<td height="30" colspan="4"><input type="checkbox" name="readed" value="checkbox" checked="checked" />
我已阅读并同意《<a href="about.asp?id=3" class="uline">用户服务条款</a>》</td>
</tr>
<tr>
<td height="25" align="right"><input name="image" type="image" src="images/reg_.jpg" width="78" height="29" border="0" /></td>
</tr>
</table>
</form></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<script src="foot.js"></script>
</table>
</body>
</html>
Go 旅城通票 2008-06-04
  • 打赏
  • 举报
回复
发asp代码和主要的js就可以了,就是和ajax有关的js
fogheart 2008-06-04
  • 打赏
  • 举报
回复
晕,实在是看不懂,整个页面的代码又贴不下
Go 旅城通票 2008-06-04
  • 打赏
  • 举报
回复
.....洋洋洒洒2板,没见asp代码和ajax代码.......

52,797

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 Ajax
社区管理员
  • Ajax
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧