| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 467 人关注过本帖
标题:[求助]注册业面
只看楼主 加入收藏
kind
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2006-10-29
收藏
 问题点数:0 回复次数:2 
[求助]注册业面

<%@ Page Language="vb" AutoEventWireup="false" Codebehind="reg.aspx.vb" Inherits="会员注册系统.注册窗体"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<title>注册数据</title>
<%Get_Cookies()%>
<script language="vb" runat="server">

Dim StrName As String
Dim Recipient As String
Dim Uid As String
Dim strSet As String


Sub Get_Cookies()
Dim NewCookie As HttpCookie
NewCookie = Request.Cookies("Rgister")

If (NewCookie Is Nothing) Then
StrName = ""
Recipient = ""
Uid = ""
strSet = ""
Else
StrName = NewCookie.Values("userName")

Recipient = NewCookie.Values("E_mail")

Uid = NewCookie.Values("uid")
strSet = NewCookie.Values("Set")
End If
End Sub

Sub DataCheck()
If reg.text1.value = "" Then
MsgBox("姓名不能为空 !",64,"oh no !")
focusto(0)
Exit Sub
End If
If InStr(reg.text2.value, "@") = 0 Then
MsgBox("不是有效地址",64,"oh no !")
focusto(3)
Exit Sub
End If
If reg.text3.value = "" Then
MsgBox("ID 不能为空")
Exit Sub
focusto(4)
End If
reg.Submit()
End Sub
Sub Focusto(X)
'document.reg.elements(x).focus()

End Sub
</script>
<meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR">
<meta content="Visual Basic .NET 7.1" name="CODE_LANGUAGE">
<meta content="JavaScript" name="vs_defaultClientScript">
<meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
</HEAD>
<body MS_POSITIONING="GridLayout">
<h2><font color="blue">超级网络</font></h2>
<hr>
<p>欢迎进入</p>
<form id="Form1" name="reg" action="reg.aspx" method="post" runat="server">
<ul>
<li>
姓名: <input size=20 value="<%=strName%>" name=text1
><br>
<li>
性别 : <input type="radio" value="male" name="set">男 <input type="radio" value="female" name="set">女
<br>
<li>
E-mail : <input size=40 value="<%=Recipient%>"
name=text2><br>
<li>
ID :<input
style="Z-INDEX: 101; LEFT: 104px; POSITION: absolute; TOP: 256px" size=10
value="<%=uid%>" name=text3><br>
</li>
</ul>
<p><INPUT onclick="datacheck " type="button" value="注册数据"> <input type="reset" value="清除数据">
</p>
<FONT face="宋体"></FONT>
</form>
<H1><A href="15-03.aspx">取消注册</A>
</H1>
</body>
</HTML>
请大虾看看在运行时候提示是
编译器错误信息: BC30451: 名称“reg”未声明。
我的窗体上不上有了可还是错
请问该怎么做啊

搜索更多相关主题的帖子: 注册 
2006-10-29 20:49
bygg
Rank: 16Rank: 16Rank: 16Rank: 16
来 自:乖乖的心中
等 级:版主
威 望:241
帖 子:13555
专家分:3076
注 册:2006-10-23
收藏
得分:0 
“reg”未声明。
是你的名字错了,还是路径错了?

飘过~~
2006-10-29 21:19
klfo
Rank: 1
等 级:新手上路
帖 子:31
专家分:0
注 册:2006-11-7
收藏
得分:0 

应该写在<body><head>
<script language="vb">

Sub DataCheck()
If reg.text1.value = "" Then
MsgBox("姓名不能为空 !",64,"oh no !")
focusto(0)
Exit Sub
End If
If InStr(reg.text2.value, "@") = 0 Then
MsgBox("不是有效地址",64,"oh no !")
focusto(3)
Exit Sub
End If
If reg.text3.value = "" Then
MsgBox("ID 不能为空")
Exit Sub
focusto(4)
End If
reg.Submit()
End Sub
Sub Focusto(X)
'document.reg.elements(x).focus()

End Sub
</script>
</head>
这样才可以的
试试吧

2006-11-16 23:53
快速回复:[求助]注册业面
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.014795 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved